Banjo API 0.0.1
Multi-purpose C99 API
|
Header file for time manipulation utilities.
Go to the source code of this file.
Data Structures | |
struct | bj_stopwatch |
Structure representing a simple stopwatch. More... | |
Typedefs | |
typedef struct bj_stopwatch | bj_stopwatch |
Structure representing a simple stopwatch. | |
Functions | |
void | bj_sleep (int milliseconds) |
Suspends the current thread for a specified duration. | |
double | bj_get_time (void) |
Gets the current time in seconds since Banjo initialization. | |
uint64_t | bj_get_time_counter (void) |
Returns the current high-resolution time counter. | |
uint64_t | bj_get_time_frequency (void) |
Returns the frequency of the high-resolution counter. | |
void | bj_stopwatch_reset (bj_stopwatch *p_stopwatch) |
Resets the stopwatch to the current time. | |
void | bj_stopwatch_step (bj_stopwatch *p_stopwatch) |
Records a step/checkpoint in time. | |
double | bj_stopwatch_elapsed (const bj_stopwatch *p_stopwatch) |
Returns the elapsed time in seconds since the stopwatch was reset. | |
double | bj_stopwatch_delay (const bj_stopwatch *p_stopwatch) |
Returns the time in seconds since the last step. | |
double | bj_stopwatch_step_delay (bj_stopwatch *p_stopwatch) |
Steps the stopwatch and returns the delay since the previous step. | |