diff options
Diffstat (limited to 'fastos/src/tests/thread_stats_test.cpp')
-rw-r--r-- | fastos/src/tests/thread_stats_test.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fastos/src/tests/thread_stats_test.cpp b/fastos/src/tests/thread_stats_test.cpp index 3633c12bcaa..a9d304d411f 100644 --- a/fastos/src/tests/thread_stats_test.cpp +++ b/fastos/src/tests/thread_stats_test.cpp @@ -31,7 +31,7 @@ class Thread_Stats_Test : public ThreadTestBase job[0].ownThread = pool.NewThread(this, static_cast<void *>(&job[0])); - FastOS_Thread::Sleep(1000); + std::this_thread::sleep_for(1s); inactiveThreads = pool.GetNumInactiveThreads(); Progress(inactiveThreads == 0, "Inactive threads = %d", inactiveThreads); @@ -44,7 +44,7 @@ class Thread_Stats_Test : public ThreadTestBase job[1].ownThread = pool.NewThread(this, static_cast<void *>(&job[1])); - FastOS_Thread::Sleep(1000); + std::this_thread::sleep_for(1s); inactiveThreads = pool.GetNumInactiveThreads(); Progress(inactiveThreads == 0, "Inactive threads = %d", inactiveThreads); @@ -57,7 +57,7 @@ class Thread_Stats_Test : public ThreadTestBase job[0].ownThread->SetBreakFlag(); job[1].ownThread->SetBreakFlag(); - FastOS_Thread::Sleep(3000); + std::this_thread::sleep_for(3s); inactiveThreads = pool.GetNumInactiveThreads(); Progress(inactiveThreads == 2, "Inactive threads = %d", inactiveThreads); @@ -72,7 +72,7 @@ class Thread_Stats_Test : public ThreadTestBase job[0].code = WAIT_FOR_BREAK_FLAG; job[0].ownThread = pool.NewThread(this, static_cast<void *>(&job[0])); - FastOS_Thread::Sleep(1000); + std::this_thread::sleep_for(1s); inactiveThreads = pool.GetNumInactiveThreads(); Progress(inactiveThreads == 1, "Inactive threads = %d", inactiveThreads); @@ -84,7 +84,7 @@ class Thread_Stats_Test : public ThreadTestBase job[1].code = WAIT_FOR_BREAK_FLAG; job[1].ownThread = pool.NewThread(this, static_cast<void *>(&job[1])); - FastOS_Thread::Sleep(1000); + std::this_thread::sleep_for(1s); inactiveThreads = pool.GetNumInactiveThreads(); Progress(inactiveThreads == 0, "Inactive threads = %d", inactiveThreads); @@ -97,7 +97,7 @@ class Thread_Stats_Test : public ThreadTestBase job[0].ownThread->SetBreakFlag(); job[1].ownThread->SetBreakFlag(); - FastOS_Thread::Sleep(3000); + std::this_thread::sleep_for(3s); inactiveThreads = pool.GetNumInactiveThreads(); Progress(inactiveThreads == 2, "Inactive threads = %d", inactiveThreads); |