Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: runtime/platform/thread_macos.cc

Issue 11361157: Fix bug 6586: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/tests/vm/vm.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/thread_macos.cc
===================================================================
--- runtime/platform/thread_macos.cc (revision 14653)
+++ runtime/platform/thread_macos.cc (working copy)
@@ -228,8 +228,9 @@
VALIDATE_PTHREAD_RESULT(result);
} else {
struct timespec ts;
- int64_t secs = millis / 1000;
- int64_t nanos = (millis - (secs * 1000)) * 1000000;
+ int64_t secs = millis / kMillisecondsPerSecond;
+ int64_t nanos = (millis - (secs * kMillisecondsPerSecond)) *
+ kNanosecondsPerMillisecond;
ts.tv_sec = secs;
ts.tv_nsec = nanos;
int result = pthread_cond_timedwait_relative_np(data_.cond(),
« no previous file with comments | « no previous file | runtime/tests/vm/vm.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698