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

Unified Diff: runtime/vm/dart.h

Issue 2583663002: Internally measure isolate uptime with monotonic time. (Closed)
Patch Set: Created 4 years 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/dart.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart.h
diff --git a/runtime/vm/dart.h b/runtime/vm/dart.h
index 9af4ed98cdf25a983c173b10f9eabfb78da9102b..934f68adf841b7985e2493d11a81bc2645852bec 100644
--- a/runtime/vm/dart.h
+++ b/runtime/vm/dart.h
@@ -56,9 +56,10 @@ class Dart : public AllStatic {
static Isolate* vm_isolate() { return vm_isolate_; }
static ThreadPool* thread_pool() { return thread_pool_; }
- // Returns a timestamp for use in debugging output in milliseconds
- // since start time.
- static int64_t timestamp();
+ static int64_t UptimeMicros();
+ static int64_t UptimeMillis() {
+ return UptimeMicros() / kMicrosecondsPerMillisecond;
+ }
static void set_pprof_symbol_generator(DebugInfo* value) {
pprof_symbol_generator_ = value;
@@ -126,7 +127,7 @@ class Dart : public AllStatic {
static void WaitForApplicationIsolateShutdown();
static Isolate* vm_isolate_;
- static int64_t start_time_;
+ static int64_t start_time_micros_;
static ThreadPool* thread_pool_;
static DebugInfo* pprof_symbol_generator_;
static ReadOnlyHandles* predefined_handles_;
« no previous file with comments | « no previous file | runtime/vm/dart.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698