|
Trace Engine
A Raycaster Engine in C
|
Macros | |
| #define | SECONDS_TO_MILLISECONDS(X) ((X) * 1000.0) |
| #define | MILLISECONDS_TO_SECONDS(X) ((X) / 1000.0) |
Functions | |
| char * | timer_to_string_with_name (const trc_timer_t timer, const char *timer_name) |
| float | get_actual_time_seconds (void) |
| float | get_actual_time_milliseconds (void) |
| trc_timer_t | create_timer (const float duration) |
| void | start_timer (trc_timer_t *timer) |
| void | reset_timer (trc_timer_t *timer) |
| bool | is_timer_up (trc_timer_t *timer) |
| #define MILLISECONDS_TO_SECONDS | ( | X | ) | ((X) / 1000.0) |
| #define SECONDS_TO_MILLISECONDS | ( | X | ) | ((X) * 1000.0) |
| trc_timer_t create_timer | ( | const float | duration | ) |
Creates a timer object with the duration (in seconds) passed by argument
| duration | The duration (in seconds) that the timer will save |
| float get_actual_time_milliseconds | ( | void | ) |
Returns the ticks elapsed in milliseconds
| float get_actual_time_seconds | ( | void | ) |
Returns the ticks elapsed in seconds
| bool is_timer_up | ( | trc_timer_t * | timer | ) |
Returns true if the timer stops and call reset_timer with the given timer; returns false if the timer has yet not finished
| timer | A pointer to the timer to check |
| void reset_timer | ( | trc_timer_t * | timer | ) |
Sets the timer to not running
| timer | A pointer to the timer to reset |
| void start_timer | ( | trc_timer_t * | timer | ) |
Starts the given timer
| timer | A pointer to the timer to start |
| char * timer_to_string_with_name | ( | const trc_timer_t | timer, |
| const char * | timer_name | ||
| ) |