Index: third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js |
index c5714f56dc119e77f9722b7264ed33349b319af8..507457672cb24e2790116e0acceeb1616f9ab83f 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js |
+++ b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js |
@@ -586,6 +586,9 @@ Number.preciseMillisToString = function(ms, precision) |
} |
/** @type {!WebInspector.UIStringFormat} */ |
+WebInspector._microsFormat = new WebInspector.UIStringFormat("%.0f\u2009\u03bcs"); |
+ |
+/** @type {!WebInspector.UIStringFormat} */ |
WebInspector._subMillisFormat = new WebInspector.UIStringFormat("%.2f\u2009ms"); |
/** @type {!WebInspector.UIStringFormat} */ |
@@ -616,9 +619,11 @@ Number.millisToString = function(ms, higherResolution) |
if (ms === 0) |
return "0"; |
+ if (higherResolution && ms < 0.1) |
+ return WebInspector._microsFormat.format(ms * 1000); |
if (higherResolution && ms < 1000) |
return WebInspector._subMillisFormat.format(ms); |
- else if (ms < 1000) |
+ if (ms < 1000) |
return WebInspector._millisFormat.format(ms); |
var seconds = ms / 1000; |