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 #include <kApi/Threads/kTimer.x.h>
15
22 //typedef kObject kTimer; --forward-declared in kApiDef.x.h
23
33 kInlineFx(k64u) kTimer_Now()
34 {
35 return xkTimer_FromTicks(xkTimer_Ticks());
36 }
37
46 kFx(kStatus) kTimer_Construct(kTimer* timer, kAlloc allocator);
47
58 kFx(kStatus) kTimer_Start(kTimer timer, k64u totalTime);
59
72 kFx(kStatus) kTimer_Stop(kTimer timer);
73
81 kFx(kBool) kTimer_IsStarted(kTimer timer);
82
90 kFx(kBool) kTimer_IsExpired(kTimer timer);
91
99 kFx(k64u) kTimer_Elapsed(kTimer timer);
100
108 kFx(k64u) kTimer_Remaining(kTimer timer);
109
110 #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.
kInlineFx
#define kInlineFx(TYPE)
Inline method declaration helper.
Definition: kApiDef.h:26
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.
Definition: kTimer.h:33
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.