libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
Loading...
Searching...
No Matches
GblTimer Struct Reference

#include <gimbal_timer.h>

Data Fields

GblTimeSpec startTime
 
GblTimeSpec stopTime
 
GblTimeSpec elapsedTime
 
GblBool active
 

Related Symbols

(Note that these are not member symbols.)

Capturing

Methods used for capturing timing data

void GblTimer_start (GblTimer *pSelf)
 
void GblTimer_stop (GblTimer *pSelf)
 
void GblTimer_continue (GblTimer *pSelf)
 
Elapsed Time

Methods for measuring elapsed time

GblBool GblTimer_isValid (const GblTimer *pSelf)
 
double GblTimer_elapsedSecs (const GblTimer *pSelf)
 
double GblTimer_elapsedMs (const GblTimer *pSelf)
 
double GblTimer_elapsedUs (const GblTimer *pSelf)
 
uint64_t GblTimer_elapsedNs (const GblTimer *pSelf)
 

Detailed Description

Represents a stopwatch-like nanosecond timer.

GblTimer is a nanosecond-resolution stopwatch-like timing API which is used for measuring elapsed time between a start and stop point.

Definition at line 40 of file gimbal_timer.h.

Friends And Related Symbol Documentation

◆ GblTimer_start()

void GblTimer_start ( GblTimer pSelf)
related

Starts the timer, which will continue running until GblTimer_stop() is called.

◆ GblTimer_stop()

void GblTimer_stop ( GblTimer pSelf)
related

Stops the timer, recording the amount of time elapsed within GblTimer::elapsedTime.

◆ GblTimer_continue()

void GblTimer_continue ( GblTimer pSelf)
related

Continues the timer, recording elapsed time where it left off.

◆ GblTimer_isValid()

GblBool GblTimer_isValid ( const GblTimer pSelf)
related

Returns GBL_TRUE if the timer contains a valid elapsed time measurement.

◆ GblTimer_elapsedSecs()

double GblTimer_elapsedSecs ( const GblTimer pSelf)
related

Returns the amount of time elapsed in seconds.

◆ GblTimer_elapsedMs()

double GblTimer_elapsedMs ( const GblTimer pSelf)
related

Returns the amount of time elapsed in milliseconds.

◆ GblTimer_elapsedUs()

double GblTimer_elapsedUs ( const GblTimer pSelf)
related

Returns the amount of time elapsed in microseconds.

◆ GblTimer_elapsedNs()

uint64_t GblTimer_elapsedNs ( const GblTimer pSelf)
related

Returns the amount of time elapsed in nanoseconds.

Field Documentation

◆ startTime

GblTimeSpec GblTimer::startTime

Initial starting timestamp.

Definition at line 41 of file gimbal_timer.h.

◆ stopTime

GblTimeSpec GblTimer::stopTime

Ending or stopping timestamp.

Definition at line 42 of file gimbal_timer.h.

◆ elapsedTime

GblTimeSpec GblTimer::elapsedTime

Calculated elapsed time.

Definition at line 43 of file gimbal_timer.h.

◆ active

GblBool GblTimer::active

Whether the timer is active or not.

Definition at line 44 of file gimbal_timer.h.


The documentation for this struct was generated from the following file: