Skip to content
Browse files

Fix for 32-bit

  • Loading branch information...
1 parent 393a3db commit 3a35f70e4f01e007bcaefcebce7f9a4fbd5ddfb2 Shuo Chen committed Aug 3, 2013
Showing with 2 additions and 2 deletions.
  1. 0 backport.diff
  2. +2 −2 muduo/base/Thread.cc
View
0 backport.diff 100755 → 100644
File mode changed.
View
4 muduo/base/Thread.cc
@@ -146,8 +146,8 @@ bool CurrentThread::isMainThread()
void CurrentThread::sleepUsec(int64_t usec)
{
struct timespec ts = { 0, 0 };
- ts.tv_sec = usec / Timestamp::kMicroSecondsPerSecond;
- ts.tv_nsec = usec % Timestamp::kMicroSecondsPerSecond * 1000;
+ ts.tv_sec = static_cast<time_t>(usec / Timestamp::kMicroSecondsPerSecond);
+ ts.tv_nsec = static_cast<long>(usec % Timestamp::kMicroSecondsPerSecond * 1000);
::nanosleep(&ts, NULL);
}

0 comments on commit 3a35f70

Please sign in to comment.
Something went wrong with that request. Please try again.