diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/IceUtil/Thread.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/IceUtil/Thread.cpp b/cpp/src/IceUtil/Thread.cpp index d689cae9b39..cfb4f11c0f0 100644 --- a/cpp/src/IceUtil/Thread.cpp +++ b/cpp/src/IceUtil/Thread.cpp @@ -214,7 +214,11 @@ IceUtil::ThreadControl::join() void IceUtil::ThreadControl::sleep(const Time& timeout) { - nanosleep(timeout, 0); + struct timeval tv = timeout; + struct timespec ts; + ts.tv_sec = tv.tv_sec; + ts.tv_nsec = tv.tv_usec * 1000L; + nanosleep(&ts, 0); } void |