2
3
4
5
6
7
8
9
10
11
12
13
14
15
22
23
24
25#define GBL_TIMER_INIT { 0
, 0
, 0
}
29#define GBL_SELF_TYPE GblTimer
34
35
36
37
38
39
48
49
50
51
61
62
63
64
struct timespec GblTimeSpec
Represents the difference between two GblTime instances.
#define GBL_TIMER_INIT
Value to assign to a GblTimer during initialization.
uint8_t GblBool
Basic boolean type, standardized to sizeof(char)
Represents a stopwatch-like nanosecond timer.
void GblTimer_stop(GblTimer *pSelf)
Stops the timer, recording the amount of time elapsed within GblTimer::elapsedTime.
double GblTimer_elapsedSecs(const GblTimer *pSelf)
Returns the amount of time elapsed in seconds.
void GblTimer_start(GblTimer *pSelf)
Starts the timer, which will continue running until GblTimer_stop() is called.
GblBool active
Whether the timer is active or not.
double GblTimer_elapsedMs(const GblTimer *pSelf)
Returns the amount of time elapsed in milliseconds.
void GblTimer_continue(GblTimer *pSelf)
Continues the timer, recording elapsed time where it left off.
GblTimeSpec stopTime
Ending or stopping timestamp.
GblTimeSpec startTime
Initial starting timestamp.
double GblTimer_elapsedUs(const GblTimer *pSelf)
Returns the amount of time elapsed in microseconds.
GblTimeSpec elapsedTime
Calculated elapsed time.
uint64_t GblTimer_elapsedNs(const GblTimer *pSelf)
Returns the amount of time elapsed in nanoseconds.
GblBool GblTimer_isValid(const GblTimer *pSelf)
Returns GBL_TRUE if the timer contains a valid elapsed time measurement.