summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-08-05 08:23:25 +0000
committerPavel Labath <pavel@labath.sk>2019-08-05 08:23:25 +0000
commit3d4f7655e73b0e364ac7c3523db97ed6fcd72488 (patch)
treec11574fd05234196d7bab1b45aedbb0e75cb0f2e /lldb/source/Target/Process.cpp
parent801d3304e9edaf04bd9a0bde1b644c186c31c6c7 (diff)
downloadbcm5719-llvm-3d4f7655e73b0e364ac7c3523db97ed6fcd72488.tar.gz
bcm5719-llvm-3d4f7655e73b0e364ac7c3523db97ed6fcd72488.zip
Remove usage of usleep in generic code
This function is not portable, and there are only a handful of usages of it anyway. Replacing it with std::this_thread::sleep_for enables us to get rid of the compatibility code in PosixApi.h. llvm-svn: 367814
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index e781926b6c0..e3875503989 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -4954,7 +4954,7 @@ Process::RunThreadPlan(ExecutionContext &exe_ctx,
#ifdef LLDB_RUN_THREAD_HALT_WITH_EVENT
// See comment above...
if (miss_first_event) {
- usleep(1000);
+ std::this_thread::sleep_for(std::chrono::milliseconds(1));
miss_first_event = false;
got_event = false;
} else
OpenPOWER on IntegriCloud