2019-08-13 14:44:16 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#ifndef timer_h__
|
|
|
|
#define timer_h__
|
|
|
|
|
|
|
|
#include "compat.h"
|
|
|
|
|
2019-08-14 14:26:48 +00:00
|
|
|
// for compatibility
|
|
|
|
#define timerUninit()
|
|
|
|
|
|
|
|
int timerInit(int const tickspersecond);
|
2019-10-19 23:43:35 +00:00
|
|
|
void timerUpdateClock(void);
|
|
|
|
int timerGetClockRate(void);
|
2019-08-13 14:44:16 +00:00
|
|
|
uint64_t timerGetTicksU64(void);
|
|
|
|
uint64_t timerGetFreqU64(void);
|
|
|
|
double timerGetHiTicks(void);
|
|
|
|
uint32_t timerGetTicks(void);
|
2019-08-14 14:26:48 +00:00
|
|
|
|
2019-08-13 14:44:16 +00:00
|
|
|
void (*timerSetCallback(void (*callback)(void)))(void);
|
|
|
|
|
2019-10-20 07:16:01 +00:00
|
|
|
inline void timerUpdate() // to avoid merge conflicts when the other games get updated.
|
|
|
|
{
|
|
|
|
timerUpdateClock();
|
|
|
|
}
|
|
|
|
|
2019-08-13 14:44:16 +00:00
|
|
|
#endif // timer_h__
|