Add `USleep` function (based in `usleep`) instead of `Sleep` from PAL
authorIgor Kulaychuk <i.kulaychuk@samsung.com>
Tue, 6 Feb 2018 13:00:21 +0000 (16:00 +0300)
committerIgor Kulaychuk <i.kulaychuk@samsung.com>
Tue, 6 Feb 2018 13:00:21 +0000 (16:00 +0300)
src/debug/netcoredbg/manageddebugger.cpp
src/debug/netcoredbg/platform.cpp
src/debug/netcoredbg/platform.h

index 6e66a59d3ff4574cbede5ceb853aaed45978fa6d..f225f3dcfa6219c0503f624f717799273a4de845 100644 (file)
@@ -881,7 +881,7 @@ static HRESULT InternalEnumerateCLRs(int pid, HANDLE **ppHandleArray, LPWSTR **p
         }
 
         // Sleep and retry enumerating the runtimes
-        Sleep(100);
+        USleep(100*1000);
         numTries++;
 
         // if (m_canceled)
index 1f06acb2ead66b8d7e42e5e06b4fe5c759521693..2b4e4667192b91963c30fbde18678097ae314256 100644 (file)
@@ -166,3 +166,8 @@ bool SetWorkDir(const std::string &path)
 {
     return chdir(path.c_str()) == 0;
 }
+
+void USleep(uint32_t duration)
+{
+    usleep(duration);
+}
index 750e65b3be2b9df13beb144ec21c2a1098a6d32a..fd99e5ddf49f5ed3d1c5e6ab9f93a50d0ab3dc0b 100644 (file)
@@ -7,3 +7,4 @@ void AddFilesFromDirectoryToTpaList(const std::string &directory, std::string &t
 std::string GetExeAbsPath();
 std::string GetFileName(const std::string &path);
 bool SetWorkDir(const std::string &path);
+void USleep(uint32_t duration);