14 #include <kApi/Threads/kTimer.x.h>
36 return kApiLib_TimerQueryHandler()();
48 return ticks * kApiLib_TimerMultiplier() / kApiLib_TimerDivider();
60 return kApiLib_TimerDivider() * time / kApiLib_TimerMultiplier();
kStatus kTimer_Stop(kTimer timer)
Stops the timer.
Represents a 64-bit unsigned integer.
k64u kTimer_Ticks()
Provides the current time in underlying clock ticks.
Definition: kTimer.h:34
Abstract base class for memory allocator types.
kBool kTimer_IsExpired(kTimer timer)
Reports whether a count-down timer has expired.
#define kInlineFx(TYPE)
Inline method declaration helper.
Definition: kApiDef.h:29
k64u kTimer_Elapsed(kTimer timer)
Reports the duration, in microseconds, for which the timer has been running.
Core Zen type declarations.
k64u kTimer_FromTicks(k64u ticks)
Converts the specified number of clock ticks to microseconds.
Definition: kTimer.h:46
k64u kTimer_Now()
Provides the current time in microseconds.
Definition: kTimer.h:72
kBool kTimer_IsStarted(kTimer timer)
Reports whether a timer has been started.
k64u kTimer_Remaining(kTimer timer)
Reports the remaining time, in microseconds, for a countdown timer.
k64u kTimer_ToTicks(k64u time)
Converts the specified number of microseconds to clock ticks.
Definition: kTimer.h:58
k64u kTimer_Spin(k64u duration)
Performs CPU busywork for at least the specified duration.
Definition: kTimer.h:91
kStatus kTimer_Start(kTimer timer, k64u totalTime)
Starts the timer.
#define kOK
Operation successful.
Definition: kApiDef.h:543
Represents an error code.
kStatus kTimer_Construct(kTimer *timer, kAlloc allocator)
Constructs a timer object.
Represents a boolean value.
Represents an interval timer.