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

Unified Diff: pkg/analysis_server/lib/src/analysis_server.dart

Issue 2918533002: Updates to the diagnostics page. (Closed)
Patch Set: use integer division Created 3 years, 7 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 | pkg/analysis_server/lib/src/status/diagnostics.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/analysis_server.dart
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index 843d50de4bdf9f74c8222fa57ff0dc97be6c83ab..fa718fccb2b69a3414156bfefcddec26274259f5 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -253,6 +253,15 @@ class AnalysisServer {
ServerPerformance performanceAfterStartup;
/**
+ * Return the total time the server's been alive.
+ */
+ Duration get uptime {
+ DateTime start = new DateTime.fromMillisecondsSinceEpoch(
+ performanceDuringStartup.startTime);
+ return new DateTime.now().difference(start);
+ }
+
+ /**
* The class into which performance information is currently being recorded.
* During startup, this will be the same as [performanceDuringStartup]
* and after startup is complete, this switches to [performanceAfterStartup].
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/status/diagnostics.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698