Zen API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kTimer.h
Go to the documentation of this file.
1 
10 #ifndef K_API_TIMER_H
11 #define K_API_TIMER_H
12 
13 #include <kApi/kApiDef.h>
14 
15 kBeginHeader()
16 
17 
23 //typedef kObject kTimer; --forward-declared in kApiDef.x.h
24 
25 
34 kFx(k64u) kTimer_Now();
35 
44 kFx(kStatus) kTimer_Construct(kTimer* timer, kAlloc allocator);
45 
56 kFx(kStatus) kTimer_Start(kTimer timer, k64u totalTime);
57 
70 kFx(kStatus) kTimer_Stop(kTimer timer);
71 
79 kFx(kBool) kTimer_IsStarted(kTimer timer);
80 
88 kFx(kBool) kTimer_IsExpired(kTimer timer);
89 
97 kFx(k64u) kTimer_Elapsed(kTimer timer);
98 
106 kFx(k64u) kTimer_Remaining(kTimer timer);
107 
108 kEndHeader()
109 
110 #include <kApi/Threads/kTimer.x.h>
111 
112 #endif
kStatus kTimer_Stop(kTimer timer)
Stops the timer.
Represents a 64-bit unsigned integer.
Abstract base class for memory allocator types.
kBool kTimer_IsExpired(kTimer timer)
Reports whether a count-down timer has expired.
k64u kTimer_Elapsed(kTimer timer)
Reports the duration, in microseconds, for which the timer has been running.
Core Zen type declarations.
k64u kTimer_Now()
Provides the current time in microseconds.
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.
kStatus kTimer_Start(kTimer timer, k64u totalTime)
Starts the timer.
Represents an error code.
kStatus kTimer_Construct(kTimer *timer, kAlloc allocator)
Constructs a timer object.
Represents a boolean value.
Represents an interval timer.
Provides a periodic function call.