Index: Source/devtools/front_end/utilities.js |
diff --git a/Source/devtools/front_end/utilities.js b/Source/devtools/front_end/utilities.js |
index bd98244bd26729eb527f1aa6795b0a2a6a4da7af..78723ec5dcdede5294ac27f63f26bb9e7468400c 100644 |
--- a/Source/devtools/front_end/utilities.js |
+++ b/Source/devtools/front_end/utilities.js |
@@ -370,6 +370,38 @@ Date.prototype.toISO8601Compact = function() |
leadZero(this.getSeconds()); |
} |
+/** |
+ * @return {string} |
+ */ |
+ Date.prototype.toConsoleTime = function() |
+{ |
+ /** |
+ * @param {number} x |
+ * @return {string} |
+ */ |
+ function leadZero2(x) |
+ { |
+ return (x > 9 ? "" : "0") + x; |
+ } |
+ |
+ /** |
+ * @param {number} x |
+ * @return {string} |
+ */ |
+ function leadZero3(x) |
+ { |
+ return (Array(4 - x.toString().length)).join('0') + x; |
+ } |
+ |
+ return this.getFullYear() + "-" + |
+ leadZero2(this.getMonth() + 1) + "-" + |
+ leadZero2(this.getDate()) + " " + |
+ leadZero2(this.getHours()) + ":" + |
+ leadZero2(this.getMinutes()) + ":" + |
+ leadZero2(this.getSeconds()) + "." + |
+ leadZero3(this.getMilliseconds()); |
+} |
+ |
Object.defineProperty(Array.prototype, "remove", |
{ |
/** |