diff options
| author | Stefan Boberg <[email protected]> | 2021-10-11 13:17:39 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-10-11 13:17:39 +0200 |
| commit | 63d168012088be6dc578298fbc9b163fbf38e150 (patch) | |
| tree | 8088c8c427c4aaa0f25071fd46f17702e758bf7d /zencore/timer.cpp | |
| parent | iobuffer: Changed MakeFromTemporaryFile so it accepts a path instead of a cha... (diff) | |
| download | zen-63d168012088be6dc578298fbc9b163fbf38e150.tar.xz zen-63d168012088be6dc578298fbc9b163fbf38e150.zip | |
Added lofreq timer update to httpsys main loop
Diffstat (limited to 'zencore/timer.cpp')
| -rw-r--r-- | zencore/timer.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/zencore/timer.cpp b/zencore/timer.cpp index 9180519bd..1655e912d 100644 --- a/zencore/timer.cpp +++ b/zencore/timer.cpp @@ -17,16 +17,20 @@ namespace zen { uint64_t GetHifreqTimerValue() { + uint64_t Timestamp; + #if ZEN_PLATFORM_WINDOWS LARGE_INTEGER li; QueryPerformanceCounter(&li); - return li.QuadPart; + Timestamp = li.QuadPart; #else struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); - return (uint64_t(ts.tv_sec) * 1000000ull) + (uint64_t(ts.tv_nsec) / 1000ull); + Timestamp = (uint64_t(ts.tv_sec) * 1000000ull) + (uint64_t(ts.tv_nsec) / 1000ull); #endif + + return Timestamp; } uint64_t |