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

Unified Diff: runtime/vm/os_fuchsia.cc

Issue 2536943002: Fuchsia: Enable newly working socket tests; use MX_CLOCK_UTC. (Closed)
Patch Set: Created 4 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 | « runtime/tests/vm/dart/hello_fuchsia_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/os_fuchsia.cc
diff --git a/runtime/vm/os_fuchsia.cc b/runtime/vm/os_fuchsia.cc
index 6c13dde3a4e243f2373027fcf5d1f5f230a6fe8c..1e3fc48c2985a05c9955a0d9ce06525dc9ea38f2 100644
--- a/runtime/vm/os_fuchsia.cc
+++ b/runtime/vm/os_fuchsia.cc
@@ -10,7 +10,6 @@
#include <errno.h>
#include <magenta/syscalls.h>
#include <magenta/types.h>
-#include <sys/time.h>
#include "platform/assert.h"
#include "vm/zone.h"
@@ -78,12 +77,7 @@ int64_t OS::GetCurrentTimeMillis() {
int64_t OS::GetCurrentTimeMicros() {
- struct timeval tv;
- if (gettimeofday(&tv, NULL) < 0) {
- UNREACHABLE();
- return 0;
- }
- return (static_cast<int64_t>(tv.tv_sec) * 1000000) + tv.tv_usec;
+ return mx_time_get(MX_CLOCK_UTC) / kNanosecondsPerMicrosecond;
}
« no previous file with comments | « runtime/tests/vm/dart/hello_fuchsia_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698