aboutsummaryrefslogtreecommitdiff
path: root/zencore/timer.cpp
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-09-15 09:05:40 +0200
committerMartin Ridgers <[email protected]>2021-09-15 09:05:40 +0200
commit1138c44843ee77460199fde01f1e1b52c02b7f10 (patch)
tree88c5865119f641d7fc98cd00ad394479bc166ad7 /zencore/timer.cpp
parentzen::Sleep() for Linux (diff)
downloadzen-1138c44843ee77460199fde01f1e1b52c02b7f10.tar.xz
zen-1138c44843ee77460199fde01f1e1b52c02b7f10.zip
Use zen::Sleep() in timer.cpp's tests
Diffstat (limited to 'zencore/timer.cpp')
-rw-r--r--zencore/timer.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/zencore/timer.cpp b/zencore/timer.cpp
index f67822e73..08b5e06d2 100644
--- a/zencore/timer.cpp
+++ b/zencore/timer.cpp
@@ -58,15 +58,6 @@ GetHifreqTimerFrequencySafe()
}
//////////////////////////////////////////////////////////////////////////
-
-#if !ZEN_PLATFORM_WINDOWS
-void Sleep(uint32_t ms)
-{
- usleep(ms * 1000U);
-}
-#endif
-
-//////////////////////////////////////////////////////////////////////////
//
// Testing related code follows...
//
@@ -80,7 +71,7 @@ TEST_CASE("Timer")
{
uint64_t s0 = GetHifreqTimerValue();
uint64_t t0 = GetCpuTimerValue();
- Sleep(1000);
+ zen::Sleep(1000);
uint64_t s1 = GetHifreqTimerValue();
uint64_t t1 = GetCpuTimerValue();
// double r = double(t1 - t0) / (s1 - s0);