diff options
| author | Andre Weissflog <floooh@gmail.com> | 2021-02-10 18:36:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-10 18:36:43 +0100 |
| commit | d2826d75c0931bc48a4b474f6db1ae301552a423 (patch) | |
| tree | 228adb3eaebd2af28675d6dd52ddc59d9318c682 /sokol_time.h | |
| parent | 9acfe8cf7b3597bfad39847a0daa564dad91b8ae (diff) | |
Language-binding-friendly API changes. (#458)
See: https://floooh.github.io/2021/02/07/sokol-api-overhaul.html
Diffstat (limited to 'sokol_time.h')
| -rw-r--r-- | sokol_time.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sokol_time.h b/sokol_time.h index 29ecdacf..8821da70 100644 --- a/sokol_time.h +++ b/sokol_time.h @@ -236,10 +236,10 @@ SOKOL_API_IMPL uint64_t stm_now(void) { #if defined(_WIN32) LARGE_INTEGER qpc_t; QueryPerformanceCounter(&qpc_t); - now = int64_muldiv(qpc_t.QuadPart - _stm.start.QuadPart, 1000000000, _stm.freq.QuadPart); + now = (uint64_t) 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 = int64_muldiv(mach_now, _stm.timebase.numer, _stm.timebase.denom); + now = (uint64_t) int64_muldiv((int64_t)mach_now, (int64_t)_stm.timebase.numer, (int64_t)_stm.timebase.denom); #elif defined(__EMSCRIPTEN__) double js_now = stm_js_perfnow() - _stm.start; SOKOL_ASSERT(js_now >= 0.0); |