From dc9028c93991011b6d7621aa4a70af1ecf8e2066 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Mon, 4 Oct 2021 12:15:21 +0200 Subject: timer: Added GetLofreqTimerValue() etc for applications that don't need particularly high resolution This value is intended to get updated as part of some higher level tick process. It is not automatic. --- zencore/timer.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'zencore/timer.cpp') diff --git a/zencore/timer.cpp b/zencore/timer.cpp index 5d30d9b29..9180519bd 100644 --- a/zencore/timer.cpp +++ b/zencore/timer.cpp @@ -68,6 +68,22 @@ GetHifreqTimerFrequencySafe() return QpcFreq; } +////////////////////////////////////////////////////////////////////////// + +uint64_t detail::g_LofreqTimerValue = GetHifreqTimerValue(); + +void +UpdateLofreqTimerValue() +{ + detail::g_LofreqTimerValue = GetHifreqTimerValue(); +} + +uint64_t +GetLofreqTimerFrequency() +{ + return GetHifreqTimerFrequencySafe(); +} + ////////////////////////////////////////////////////////////////////////// // // Testing related code follows... -- cgit v1.2.3