28 #ifndef SYS_TIME_ARCH_H
29 #define SYS_TIME_ARCH_H
55 time_t d_sec = now->tv_sec - prev->tv_sec;
56 long d_nsec = now->tv_nsec - prev->tv_nsec;
60 d_nsec += 1000000000L;
62 return d_sec * 1000000 + d_nsec / 1000;
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
static unsigned int sys_time_elapsed_us(struct timespec *prev, struct timespec *now)
elapsed time in microsecs between two timespecs
void sys_time_usleep(uint32_t us)
sys_time_usleep(uint32_t us)
uint32_t get_sys_time_msec(void)
Get the time in milliseconds since startup.