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

Unified Diff: runtime/lib/stopwatch.cc

Issue 1563473002: Refactor monotonic clock interface and use raw tick values in stopwatch (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | runtime/vm/os.h » ('j') | runtime/vm/os_macos.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/stopwatch.cc
diff --git a/runtime/lib/stopwatch.cc b/runtime/lib/stopwatch.cc
index ce8951de29d9adce285a92d2bf6017d339796d95..934aba568e6849f3153a1ee354c33a79824cf262 100644
--- a/runtime/lib/stopwatch.cc
+++ b/runtime/lib/stopwatch.cc
@@ -10,14 +10,12 @@
namespace dart {
DEFINE_NATIVE_ENTRY(Stopwatch_now, 0) {
- // TODO(iposva): investigate other hi-res time sources such as cycle count.
- return Integer::New(OS::GetCurrentMonotonicMicros());
+ return Integer::New(OS::GetCurrentMonotonicTicks());
}
DEFINE_NATIVE_ENTRY(Stopwatch_frequency, 0) {
- // TODO(iposva): investigate other hi-res time sources such as cycle count.
- return Integer::New(1000000);
+ return Integer::New(OS::GetCurrentMonotonicFrequency());
}
} // namespace dart
« no previous file with comments | « no previous file | runtime/vm/os.h » ('j') | runtime/vm/os_macos.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698