diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/sem_test.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/sem_test.cpp b/test/sem_test.cpp index 0400e38..453ba07 100644 --- a/test/sem_test.cpp +++ b/test/sem_test.cpp @@ -31,7 +31,7 @@ wait_for_sem(Raul::Semaphore* sem) static void timed_wait_for_sem(Raul::Semaphore* sem) { - while (!sem->timed_wait(100)) {} + while (!sem->timed_wait(std::chrono::milliseconds(100))) {} } int @@ -54,13 +54,13 @@ main() // Check that timed_wait actually waits const auto start = std::chrono::steady_clock::now(); - sem.timed_wait(100); + sem.timed_wait(std::chrono::milliseconds(100)); const auto end = std::chrono::steady_clock::now(); assert(end - start > std::chrono::milliseconds(100)); assert(end - start < std::chrono::milliseconds(200)); // Check that we can't successfully wait on a zero semaphore - assert(!sem.timed_wait(100)); + assert(!sem.timed_wait(std::chrono::milliseconds(100))); // Check that initial value works correctly sem = Raul::Semaphore(2); |