Timer
Typedefs
-
typedef struct binocle_timer binocle_timer
General-purpose timer, measured in milliseconds.
Functions
-
binocle_timer binocle_timer_new()
-
void binocle_timer_start(binocle_timer *timer)
Sets a starting point for the timer.
-
void binocle_timer_stop(binocle_timer *timer)
Sets a stopping point for the timer.
-
void binocle_timer_pause(binocle_timer *timer)
Temporarily stops the timer.
-
void binocle_timer_restart(binocle_timer *timer)
Stops and starts the timer.
-
void binocle_timer_unpause(binocle_timer *timer)
Restarts the timer if it was paused.
-
int32_t binocle_timer_is_running(const binocle_timer *timer)
Tells if the timer’s still running (hasn’t called stop())
-
int32_t binocle_timer_is_paused(const binocle_timer *timer)
Tells if the timer’s paused.
-
uint32_t binocle_timer_delta(const binocle_timer *timer)
Returns the whole timer’s difference in milisseconds.
-
uint32_t binocle_timer_delta_ms(const binocle_timer *timer)
Returns the milisseconds part of the timer’s difference.
-
uint32_t binocle_timer_delta_s(const binocle_timer *timer)
Returns the seconds part of the timer’s difference.
-
uint32_t binocle_timer_current_time(const binocle_timer *timer)
Returns the difference between timer’s start point and now.
-
struct binocle_timer
- #include <binocle_timer.h>
General-purpose timer, measured in milliseconds.