Zen API

- Home
- Topics
- Types
- Files

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
kTimer::kTimer_Stop
kStatus kTimer_Stop(kTimer timer)
Stops the timer.
k64u
Represents a 64-bit unsigned integer.
kAlloc
Abstract base class for memory allocator types.
kTimer::kTimer_IsExpired
kBool kTimer_IsExpired(kTimer timer)
Reports whether a count-down timer has expired.
kTimer::kTimer_Elapsed
k64u kTimer_Elapsed(kTimer timer)
Reports the duration, in microseconds, for which the timer has been running.
kApiDef.h
Core Zen type declarations.
kTimer::kTimer_Now
k64u kTimer_Now()
Provides the current time in microseconds.
kTimer::kTimer_IsStarted
kBool kTimer_IsStarted(kTimer timer)
Reports whether a timer has been started.
kTimer::kTimer_Remaining
k64u kTimer_Remaining(kTimer timer)
Reports the remaining time, in microseconds, for a countdown timer.
kTimer::kTimer_Start
kStatus kTimer_Start(kTimer timer, k64u totalTime)
Starts the timer.
kStatus
Represents an error code.
kTimer::kTimer_Construct
kStatus kTimer_Construct(kTimer *timer, kAlloc allocator)
Constructs a timer object.
kBool
Represents a boolean value.
kTimer
Represents an interval timer.
kPeriodic
Provides a periodic function call.