diff options
| author | Andre Weissflog <floooh@gmail.com> | 2021-12-23 20:24:00 +0100 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2021-12-23 20:24:00 +0100 |
| commit | d8f1118ee9ad983080156579f5cb69d222e40e2d (patch) | |
| tree | 6ca129d4a9629937c3ec68f468b7e6637d7de41b /sokol_time.h | |
| parent | 8edf0aadaf14d17402d064c692128b18321d458c (diff) | |
sokol_time.h: add _stm prefix to int64_muldiv()
Diffstat (limited to 'sokol_time.h')
| -rw-r--r-- | sokol_time.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sokol_time.h b/sokol_time.h index b8b323ef..114e2903 100644 --- a/sokol_time.h +++ b/sokol_time.h @@ -199,7 +199,7 @@ static _stm_state_t _stm; see https://gist.github.com/jspohr/3dc4f00033d79ec5bdaf67bc46c813e3 */ #if defined(_WIN32) || (defined(__APPLE__) && defined(__MACH__)) -_SOKOL_PRIVATE int64_t int64_muldiv(int64_t value, int64_t numer, int64_t denom) { +_SOKOL_PRIVATE int64_t _stm_int64_muldiv(int64_t value, int64_t numer, int64_t denom) { int64_t q = value / denom; int64_t r = value % denom; return q * numer + r * numer / denom; @@ -230,10 +230,10 @@ SOKOL_API_IMPL uint64_t stm_now(void) { #if defined(_WIN32) LARGE_INTEGER qpc_t; QueryPerformanceCounter(&qpc_t); - now = (uint64_t) int64_muldiv(qpc_t.QuadPart - _stm.start.QuadPart, 1000000000, _stm.freq.QuadPart); + now = (uint64_t) _stm_int64_muldiv(qpc_t.QuadPart - _stm.start.QuadPart, 1000000000, _stm.freq.QuadPart); #elif defined(__APPLE__) && defined(__MACH__) const uint64_t mach_now = mach_absolute_time() - _stm.start; - now = (uint64_t) int64_muldiv((int64_t)mach_now, (int64_t)_stm.timebase.numer, (int64_t)_stm.timebase.denom); + now = (uint64_t) _stm_int64_muldiv((int64_t)mach_now, (int64_t)_stm.timebase.numer, (int64_t)_stm.timebase.denom); #elif defined(__EMSCRIPTEN__) double js_now = emscripten_get_now() - _stm.start; now = (uint64_t) (js_now * 1000000.0); |