diff options
| author | Mikhail Romanko <me@blankhex.com> | 2025-09-21 22:07:54 +0300 |
|---|---|---|
| committer | Mikhail Romanko <me@blankhex.com> | 2025-09-21 22:07:54 +0300 |
| commit | b1870bd709cb1e1b8353df1c115529bbb324716a (patch) | |
| tree | 0b06c44d8de17ad438013d7450a3ac3ee17c8d61 /include/BH/Timer.h | |
| parent | 9bd200702311fdf3794e53c56c212d9ac31728ca (diff) | |
| download | bhlib-b1870bd709cb1e1b8353df1c115529bbb324716a.tar.gz | |
Add timers for measuring elapsed time
Diffstat (limited to 'include/BH/Timer.h')
| -rw-r--r-- | include/BH/Timer.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/BH/Timer.h b/include/BH/Timer.h new file mode 100644 index 0000000..51ab0de --- /dev/null +++ b/include/BH/Timer.h @@ -0,0 +1,32 @@ +#ifndef BH_TIMER_H +#define BH_TIMER_H + + +#include "Common.h" + + +typedef struct BH_Timer BH_Timer; + + +BH_Timer *BH_TimerNew(void); + + +void BH_TimerFree(BH_Timer *timer); + + +int BH_TimerIsMonotonic(BH_Timer *timer); + + +void BH_TimerStart(BH_Timer *timer); + + +int64_t BH_TimerRestart(BH_Timer *timer); + + +int64_t BH_TimerMilliseconds(BH_Timer *timer); + + +int64_t BH_TimerNanoseconds(BH_Timer *timer); + + +#endif /* BH_TIMER_H */ |
