diff options
author | Kevin Dubrulle <kevin.dubrulle@gmail.com> | 2018-07-07 13:34:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-08 11:48:40 +0200 |
commit | d0f44d8ba7e87aa263008d3cfc4e68294d783162 (patch) | |
tree | 8527c62fb066366df2b40386c6544e670aa10a1a /sal/qa/osl/mutex | |
parent | a2193f8f33565cc896592acb9d3ab65c756d97fb (diff) |
tdf#84323 - sal - add sane sleep interface: cleanup osl_waitThread
Replace osl_waitThread by osl::Thread::wait.
Use std::chrono instead of TimeValue.
Change-Id: I71691d014feeeb0c5d0ba29d048bda8e25e6e7dd
Reviewed-on: https://gerrit.libreoffice.org/57130
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal/qa/osl/mutex')
-rw-r--r-- | sal/qa/osl/mutex/osl_Mutex.cxx | 5 |
1 files changed, 1 insertions, 4 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 ) { |