summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bx/tests/os_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bx/tests/os_test.cpp')
-rw-r--r--3rdparty/bx/tests/os_test.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/3rdparty/bx/tests/os_test.cpp b/3rdparty/bx/tests/os_test.cpp
index bf51c725e05..6f1151558c3 100644
--- a/3rdparty/bx/tests/os_test.cpp
+++ b/3rdparty/bx/tests/os_test.cpp
@@ -1,6 +1,6 @@
/*
- * Copyright 2010-2018 Branimir Karadzic. All rights reserved.
- * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
+ * Copyright 2010-2022 Branimir Karadzic. All rights reserved.
+ * License: https://github.com/bkaradzic/bx/blob/master/LICENSE
*/
#include "test.h"
@@ -14,15 +14,19 @@ TEST_CASE("getProcessMemoryUsed", "")
// DBG("bx::getProcessMemoryUsed %d", bx::getProcessMemoryUsed() );
}
+#if BX_CONFIG_SUPPORTS_THREADING
+
TEST_CASE("semaphore_timeout", "")
{
bx::Semaphore sem;
- int64_t start = bx::getHPCounter();
- bool ok = sem.wait(900);
- int64_t elapsed = bx::getHPCounter() - start;
+ int64_t start = bx::getHPCounter();
+ bool ok = sem.wait(900);
+ int64_t elapsed = bx::getHPCounter() - start;
int64_t frequency = bx::getHPFrequency();
- double ms = double(elapsed) / double(frequency) * 1000;
- printf("%f\n", ms);
+ double ms = double(elapsed) / double(frequency) * 1000;
+ bx::printf("%f\n", ms);
REQUIRE(!ok);
}
+
+#endif // BX_CONFIG_SUPPORTS_THREADING