25 #ifndef UPM_UTILITIES_H_
26 #define UPM_UTILITIES_H_
28 #include <upm_platform.h>
34 #if defined(UPM_PLATFORM_LINUX)
41 typedef struct timeval upm_clock_t;
44 #if defined(UPM_PLATFORM_ZEPHYR)
47 #include <sys_clock.h>
49 #include <kernel_version.h>
51 #if defined(CONFIG_STDOUT_CONSOLE)
55 #include <misc/printk.h>
59 typedef uint32_t upm_clock_t;
65 #define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
72 void upm_delay(
int time);
79 void upm_delay_ms(
int time);
86 void upm_delay_us(
int time);
94 void upm_clock_init(upm_clock_t *clock);
104 uint32_t upm_elapsed_ms(upm_clock_t *clock);
114 uint32_t upm_elapsed_us(upm_clock_t *clock);