28 #ifndef SYS_TIME_ARCH_H
29 #define SYS_TIME_ARCH_H
63 time_t d_sec = now->tv_sec - prev->tv_sec;
64 long d_nsec = now->tv_nsec - prev->tv_nsec;
68 d_nsec += 1000000000L;
70 return d_sec * 1000000 + d_nsec / 1000;
static uint32_t msec_of_cpu_ticks(uint32_t cpu_ticks)
static uint32_t get_sys_time_msec(void)
Get the time in milliseconds since startup.
static uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
static uint32_t usec_of_cpu_ticks(uint32_t cpu_ticks)
static unsigned int sys_time_elapsed_us(struct timespec *prev, struct timespec *now)
elapsed time in microsecs between two timespecs
volatile uint32_t nb_sec_rem
remainder of seconds since startup in CPU_TICKS
static void sys_time_usleep(uint32_t us)
volatile uint32_t nb_sec
full seconds since startup