summaryrefslogtreecommitdiff
path: root/desktop/source/app
diff options
context:
space:
mode:
authorArnaud VERSINI <arnaud.versini@libreoffice.org>2022-11-06 17:04:20 +0100
committerStephan Bergmann <sbergman@redhat.com>2023-01-09 08:37:35 +0000
commit555f4333182abd0ca4aa06b354763f6dfbc3eb20 (patch)
tree6f7e2ad77cd297782b8b91ad95f44ce78fc2c130 /desktop/source/app
parent42d9077fc4ffc35d769412a979d91e836adb2536 (diff)
use std::this_thread::sleep_for instead of osl equivalent
Change-Id: I5b4edc5417e5bb5e082688df616e1d5735717d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142357 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'desktop/source/app')
-rw-r--r--desktop/source/app/officeipcthread.cxx16
1 files changed, 4 insertions, 12 deletions
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index 45b8906c3b42..74f838939bfa 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -48,6 +48,7 @@
#include <cassert>
#include <cstdlib>
#include <memory>
+#include <thread>
#if ENABLE_DBUS
#include <dbus/dbus.h>
@@ -792,10 +793,7 @@ RequestHandler::Status PipeIpcThread::enable(rtl::Reference<IpcThread> * thread)
else
{
// Pipe connection failed (other office exited or crashed)
- TimeValue tval;
- tval.Seconds = 0;
- tval.Nanosec = 500000000;
- salhelper::Thread::wait( tval );
+ std::this_thread::sleep_for( std::chrono::milliseconds(500) );
}
}
else
@@ -805,10 +803,7 @@ RequestHandler::Status PipeIpcThread::enable(rtl::Reference<IpcThread> * thread)
return RequestHandler::IPC_STATUS_PIPE_ERROR;
// Wait for second office to be ready
- TimeValue aTimeValue;
- aTimeValue.Seconds = 0;
- aTimeValue.Nanosec = 10000000; // 10ms
- salhelper::Thread::wait( aTimeValue );
+ std::this_thread::sleep_for( std::chrono::milliseconds(10) );
}
} while ( nPipeMode == PIPEMODE_DONTKNOW );
@@ -1206,10 +1201,7 @@ void PipeIpcThread::execute()
}
SAL_WARN( "desktop.app", "Error on accept: " << static_cast<int>(nError));
- TimeValue tval;
- tval.Seconds = 1;
- tval.Nanosec = 0;
- salhelper::Thread::wait( tval );
+ std::this_thread::sleep_for( std::chrono::seconds(1) );
}
} while( schedule() );
}