diff options
Diffstat (limited to 'sal')
-rw-r--r-- | sal/qa/osl/mutex/osl_Mutex.cxx | 5 | ||||
-rw-r--r-- | sal/qa/osl/pipe/osl_Pipe.cxx | 5 | ||||
-rw-r--r-- | sal/qa/osl/process/osl_Thread.cxx | 9 | ||||
-rw-r--r-- | sal/qa/rtl/doublelock/rtl_doublelocking.cxx | 10 |
4 files changed, 4 insertions, 25 deletions
diff --git a/sal/qa/osl/mutex/osl_Mutex.cxx b/sal/qa/osl/mutex/osl_Mutex.cxx index 90f5b31e2c79..c9959038c5ea 100644 --- a/sal/qa/osl/mutex/osl_Mutex.cxx +++ b/sal/qa/osl/mutex/osl_Mutex.cxx @@ -34,10 +34,7 @@ namespace ThreadHelper { void thread_sleep_tenth_sec(sal_uInt32 _nTenthSec) { - TimeValue nTV; - nTV.Seconds = _nTenthSec/10; - nTV.Nanosec = ( (_nTenthSec%10 ) * 100000000 ); - osl_waitThread(&nTV); + osl::Thread::wait(std::chrono::milliseconds(_nTenthSec * 100)); } void thread_sleep( sal_uInt32 _nSec ) { diff --git a/sal/qa/osl/pipe/osl_Pipe.cxx b/sal/qa/osl/pipe/osl_Pipe.cxx index ea29fdd7c742..dbd224e50da5 100644 --- a/sal/qa/osl/pipe/osl_Pipe.cxx +++ b/sal/qa/osl/pipe/osl_Pipe.cxx @@ -743,10 +743,7 @@ namespace osl_StreamPipe /// print statement in thread process must use fflush() to force display. fflush(stdout); - TimeValue nTV; - nTV.Seconds = _nSec; - nTV.Nanosec = 0; - osl_waitThread(&nTV); + osl::Thread::wait(std::chrono::seconds(_nSec)); } // test read/write & send/recv data to pipe diff --git a/sal/qa/osl/process/osl_Thread.cxx b/sal/qa/osl/process/osl_Thread.cxx index 396aa86efdb4..e5c9680cf35b 100644 --- a/sal/qa/osl/process/osl_Thread.cxx +++ b/sal/qa/osl/process/osl_Thread.cxx @@ -180,14 +180,7 @@ namespace ThreadHelper { void thread_sleep_tenth_sec(sal_Int32 _nTenthSec) { -#ifdef _WIN32 - Sleep(_nTenthSec * 100 ); -#else - TimeValue nTV; - nTV.Seconds = static_cast<sal_uInt32>( _nTenthSec/10 ); - nTV.Nanosec = ( (_nTenthSec%10 ) * 100000000 ); - osl_waitThread(&nTV); -#endif + osl::Thread::wait(std::chrono::milliseconds(_nTenthSec * 100)); } void outputPriority(oslThreadPriority const& _aPriority) diff --git a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx index f882b104c9bc..e37400ba7f8f 100644 --- a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx +++ b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx @@ -67,15 +67,7 @@ namespace ThreadHelper // printf("wait %d tenth seconds. ", _nTenthSec ); // fflush(stdout); // } -#ifdef _WIN32 //Windows - Sleep(_nTenthSec * 100 ); -#endif -#if ( defined UNX ) - TimeValue nTV; - nTV.Seconds = static_cast<sal_uInt32>( _nTenthSec/10 ); - nTV.Nanosec = ( (_nTenthSec%10 ) * 100000000 ); - osl_waitThread(&nTV); -#endif + osl::Thread::wait(std::chrono::milliseconds(_nTenthSec * 100)); // if (nVerbose == VERBOSE) // { // printf("done\n"); |