diff options
| author | Stefan Boberg <[email protected]> | 2025-03-12 13:19:55 +0100 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2025-03-12 13:19:55 +0100 |
| commit | 030270dd74e43bfa8da94e6b8d2de0f816540736 (patch) | |
| tree | 904b2f041f76527094def4d1f70f40c2f8450d5f /src/zencore/timer.cpp | |
| parent | Merge remote-tracking branch 'origin/main' into sb/build-cache (diff) | |
| download | zen-030270dd74e43bfa8da94e6b8d2de0f816540736.tar.xz zen-030270dd74e43bfa8da94e6b8d2de0f816540736.zip | |
add GetTimeSinceProcessStart returning time since process start
implemented using https://github.com/maxliani/GetTimeSinceProcessStart/tree/main
Diffstat (limited to 'src/zencore/timer.cpp')
| -rw-r--r-- | src/zencore/timer.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/zencore/timer.cpp b/src/zencore/timer.cpp index 1655e912d..95536cb26 100644 --- a/src/zencore/timer.cpp +++ b/src/zencore/timer.cpp @@ -12,9 +12,20 @@ # include <unistd.h> #endif +#define GTSPS_IMPLEMENTATION +#include "GetTimeSinceProcessStart.h" + namespace zen { uint64_t +GetTimeSinceProcessStart() +{ + double TimeInSeconds = ::GetTimeSinceProcessStart(); + + return uint64_t(TimeInSeconds * 1000); +} + +uint64_t GetHifreqTimerValue() { uint64_t Timestamp; |