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

Unified Diff: runtime/vm/os_thread_fuchsia.cc

Issue 2189973003: Fuchsia: Make some more VM tests pass (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 months 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
Index: runtime/vm/os_thread_fuchsia.cc
diff --git a/runtime/vm/os_thread_fuchsia.cc b/runtime/vm/os_thread_fuchsia.cc
index cca791cb6e2debebc99a6fd0cb68f5b60af19b70..536f11f83e54cea5be58cc72814bb9bbf8a93802 100644
--- a/runtime/vm/os_thread_fuchsia.cc
+++ b/runtime/vm/os_thread_fuchsia.cc
@@ -52,12 +52,8 @@ static void ComputeTimeSpecMicros(struct timespec* ts, int64_t micros) {
int64_t secs = target / kNanosecondsPerSecond;
int64_t nanos = target - (secs * kNanosecondsPerSecond);
- ts->tv_sec += secs;
- ts->tv_nsec += nanos;
- if (ts->tv_nsec >= kNanosecondsPerSecond) {
- ts->tv_sec += 1;
- ts->tv_nsec -= kNanosecondsPerSecond;
- }
+ ts->tv_sec = secs;
+ ts->tv_nsec = nanos;
}

Powered by Google App Engine
This is Rietveld 408576698