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

Unified Diff: runtime/observatory/lib/utils.dart

Issue 1250853006: Logging page (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 | « runtime/observatory/lib/src/elements/logging.html ('k') | runtime/observatory/observatory_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/utils.dart
diff --git a/runtime/observatory/lib/utils.dart b/runtime/observatory/lib/utils.dart
index c696529c750b20bfcc1e09bf1d15131c2ab5018b..cfc447c7c5cffd5f935ce5f19a9fb0ff04b24fa2 100644
--- a/runtime/observatory/lib/utils.dart
+++ b/runtime/observatory/lib/utils.dart
@@ -135,6 +135,13 @@ class Utils {
return '${seconds}s';
}
+ static String formatDateTime(DateTime now) {
+ return '${now.year}-${now.month}-${now.day} '
+ '${now.hour.toString().padLeft(2)}:'
+ '${now.minute.toString().padLeft(2)}:'
+ '${now.second.toString().padLeft(2)}';
+ }
+
static String formatSeconds(double x) {
return x.toStringAsFixed(2);
}
« no previous file with comments | « runtime/observatory/lib/src/elements/logging.html ('k') | runtime/observatory/observatory_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698