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

Unified Diff: base/time/time_fuchsia.cc

Issue 2692273008: Hacky slashy (Closed)
Patch Set: wip Created 3 years, 10 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: base/time/time_fuchsia.cc
diff --git a/base/time/time_fuchsia.cc b/base/time/time_fuchsia.cc
new file mode 100644
index 0000000000000000000000000000000000000000..32fdb3d563f6d75f5751dcc968ea2ecd28c6b6f1
--- /dev/null
+++ b/base/time/time_fuchsia.cc
@@ -0,0 +1,17 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/time/time.h"
+
+#include <magenta/syscalls.h>
+
+namespace base {
+
+// static
+TimeTicks TimeTicks::Now() {
+ return TimeTicks(mx_time_get(MX_CLOCK_MONOTONIC) /
+ base::Time::kNanosecondsPerMicrosecond);
+}
+
+} // namespace base

Powered by Google App Engine
This is Rietveld 408576698