Index: sdk/lib/_internal/pub/lib/src/progress.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/progress.dart b/sdk/lib/_internal/pub/lib/src/progress.dart |
index 059d480ddec659ba6e32ef3fff758c630f4170c8..af7c0afb6e5b534c69817a20705246c69283ca79 100644 |
--- a/sdk/lib/_internal/pub/lib/src/progress.dart |
+++ b/sdk/lib/_internal/pub/lib/src/progress.dart |
@@ -8,6 +8,7 @@ import 'dart:async'; |
import 'dart:io'; |
import 'log.dart' as log; |
+import 'utils.dart'; |
/// A live-updating progress indicator for long-running log entries. |
class Progress { |
@@ -60,19 +61,7 @@ class Progress { |
} |
/// Gets the current progress time as a parenthesized, formatted string. |
- String get _time { |
- var elapsed = _stopwatch.elapsed; |
- var time = "("; |
- |
- // TODO(rnystrom): Move this somewhere reusable. |
- if (elapsed.inMinutes > 0) { |
- time += "${elapsed.inMinutes}:"; |
- } |
- |
- var s = elapsed.inSeconds % 59; |
- var ms = (elapsed.inMilliseconds % 1000) ~/ 100; |
- return time + "$s.${ms}s)"; |
- } |
+ String get _time => "(${niceDuration(_stopwatch.elapsed)})"; |
/// Refreshes the progress line. |
void _update() { |