aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tests/test_os_utils.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tests/test_os_utils.cpp b/src/tests/test_os_utils.cpp
index d06f5dbb1..6707e8960 100644
--- a/src/tests/test_os_utils.cpp
+++ b/src/tests/test_os_utils.cpp
@@ -7,7 +7,6 @@
#include "tests.h"
#include <botan/internal/os_utils.h>
-#include <thread>
// For __ud2 intrinsic
#if defined(BOTAN_TARGET_COMPILER_IS_MSVC)
@@ -73,7 +72,12 @@ class OS_Utils_Tests final : public Test
const uint64_t proc_ts1 = Botan::OS::get_processor_timestamp();
// do something that consumes a little time
- std::this_thread::sleep_for(std::chrono::milliseconds(50));
+ volatile int x = 11;
+ while(x < 65535)
+ {
+ x *= 2;
+ x -= 10;
+ }
uint64_t proc_ts2 = Botan::OS::get_processor_timestamp();