54 return (uint64_t)time.tv_sec * 1000 + (uint64_t)(time.tv_nsec / 1000000);
67 return (uint64_t)time.tv_sec * 1000000 + (uint64_t)(time.tv_nsec / 1000);
80 return (uint64_t)time.tv_sec * 1000000000 + (uint64_t)time.tv_nsec;
100 if(secs) *secs = time.tv_sec;
101 if(msecs) *msecs = (
uint32_t)(time.tv_nsec / 1000000);
122 if(secs) *secs = time.tv_sec;
123 if(usecs) *usecs = (
uint32_t)(time.tv_nsec / 1000);
144 if(secs) *secs = time.tv_sec;
145 if(nsecs) *nsecs = (
uint32_t)time.tv_nsec;
202__depr(
"Do not use timer_spin_sleep(), use thd_sleep() instead")
static uint32_t("Please see purupuru_effect_t for modern equivalent.") PURUPURU_EFFECT2_UINTENSITY(uint8_t x)
Definition purupuru.h:96
#define inline
Definition cdefs.h:107
Do not use timer_spin_sleep()
Spin-loop delay function with millisecond granularity.
static void timer_ns_gettime(uint32_t *secs, uint32_t *nsecs)
Get the current uptime of the system (in secs and nanosecs).
Definition timer.h:141
static uint64_t timer_us_gettime64(void)
Get the current uptime of the system (in microseconds).
Definition timer.h:64
static timespec_t timer_gettime(void)
Get the current uptime of the system.
Definition timer.h:38
static uint64_t timer_ms_gettime64(void)
Get the current uptime of the system (in milliseconds).
Definition timer.h:51
static uint64_t timer_ns_gettime64(void)
Get the current uptime of the system (in nanoseconds).
Definition timer.h:77
static void timer_ms_gettime(uint32_t *secs, uint32_t *msecs)
Get the current uptime of the system (in secs and millisecs).
Definition timer.h:97
static void timer_us_gettime(uint32_t *secs, uint32_t *usecs)
Get the current uptime of the system (in secs and microsecs).
Definition timer.h:119
static void timer_spin_delay_ns(unsigned short ns)
Spin-loop delay function with nanosecond granularity.
Definition timer.h:184
static void timer_spin_delay_us(unsigned short us)
Spin-loop delay function with microsecond granularity.
Definition timer.h:162
static struct timespec arch_timer_gettime(void)
Get the current uptime of the system (in seconds and nanoseconds).
Definition timer.h:259
struct timespec timespec_t
Definition timer.h:28
Low-level timer functionality.
KOS-implementation of select C11 and POSIX extensions.