Unverified Commit 6f5699a2 authored by Sergiu Deitsch's avatar Sergiu Deitsch Committed by GitHub

Merge pull request #460 from neheb/patch-1

googletest: Switch to nanosleep
parents 1655f4f9 1d762fa5
......@@ -574,7 +574,12 @@ class Thread {
static inline void SleepForMilliseconds(int t) {
#ifndef OS_WINDOWS
# if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L
const struct timespec req = {0, t * 1000 * 1000};
nanosleep(&req, NULL);
# else
usleep(t * 1000);
# endif
#else
Sleep(t);
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment