#include <stdint.h>
Go to the source code of this file.
|
typedef uint64_t | tick_t |
| Tick type.
|
|
typedef double | deltatime_t |
| Deltatime type (float or double)
|
|
Time measurements
Definition in file timer.h.
◆ TIMER_API
◆ deltatime_t
Deltatime type (float or double)
Definition at line 41 of file timer.h.
◆ tick_t
Tick type.
Definition at line 35 of file timer.h.
◆ timer_current()
TIMER_API tick_t timer_current |
( |
void | | ) |
|
Get current timestamp, in ticks of system-specific frequency (queryable with timer_ticks_per_second), measured from some system-specific base timestamp and not in sync with other timestamps
- Returns
- Current timestamp
◆ timer_elapsed()
Get elapsed time since given timestamp
- Parameters
-
- Returns
- Number of seconds elapsed
◆ timer_elapsed_ticks()
Get elapsed ticks since given timestamp
- Parameters
-
- Returns
- Number of ticks elapsed
◆ timer_lib_initialize()
TIMER_API int timer_lib_initialize |
( |
void | | ) |
|
◆ timer_lib_shutdown()
TIMER_API void timer_lib_shutdown |
( |
void | | ) |
|
◆ timer_system()
TIMER_API tick_t timer_system |
( |
void | | ) |
|
Get system time, in milliseconds since the epoch (UNIX time)
- Returns
- Current timestamp, in milliseconds
◆ timer_ticks_per_second()
TIMER_API tick_t timer_ticks_per_second |
( |
void | | ) |
|
Get timer frequency, as number of ticks per second
- Returns
- Ticks per second
◆ timer_ticks_to_seconds()
Get ticks as seconds (effectively calculating ticks/timer_ticks_per_second())
- Parameters
-
- Returns
- Deltatime in seconds