| 1 |
/* |
| 2 |
* This file is part of the DXX-Rebirth project <https://www.dxx-rebirth.com/>. |
| 3 |
* It is copyright by its individual contributors, as recorded in the |
| 4 |
* project's Git history. See COPYING.txt at the top level for license |
| 5 |
* terms and a link to the Git history. |
| 6 |
*/ |
| 7 |
|
| 8 |
/* |
| 9 |
* |
| 10 |
* Header for timer functions |
| 11 |
* |
| 12 |
*/ |
| 13 |
|
| 14 |
#pragma once |
| 15 |
|
| 16 |
#include "maths.h" |
| 17 |
|
| 18 |
#ifdef __cplusplus |
| 19 |
namespace dcx { |
| 20 |
|
| 21 |
fix64 timer_update(); |
| 22 |
|
| 23 |
[[nodiscard]] |
| 24 |
fix64 timer_query(); |
| 25 |
|
| 26 |
void timer_delay_ms(unsigned milliseconds); |
| 27 |
static inline void timer_delay(fix seconds) |
| 28 |
{ |
| 29 |
timer_delay_ms(f2i(seconds * 1000)); |
| 30 |
} |
| 31 |
void timer_delay_bound(unsigned bound); |
| 32 |
static inline void timer_delay2(int fps) |
| 33 |
{ |
| 34 |
timer_delay_bound(1000u / fps); |
| 35 |
} |
| 36 |
|
| 37 |
} |
| 38 |
#endif |