Index: chrome/browser/resources/sync_internals/chrome_sync.js |
diff --git a/chrome/browser/resources/sync_internals/chrome_sync.js b/chrome/browser/resources/sync_internals/chrome_sync.js |
index e0eb4cfef756ff292dad1e78675d5ee0c6fd2b92..aa91c7414069525473876fd8949f332533ffe7d2 100644 |
--- a/chrome/browser/resources/sync_internals/chrome_sync.js |
+++ b/chrome/browser/resources/sync_internals/chrome_sync.js |
@@ -150,4 +150,21 @@ for (var i = 0; i < syncFunctions.length; ++i) { |
chrome.sync[syncFunction] = makeSyncFunction(syncFunction); |
} |
+/** |
+ * Returns an object which measures elapsed time. |
+ */ |
+chrome.sync.makeTimer = function() { |
+ var start = new Date(); |
+ |
+ return { |
+ /** |
+ * @return {number} The number of seconds since the timer was |
+ * created. |
+ */ |
+ get elapsedSeconds() { |
+ return ((new Date()).getTime() - start.getTime()) / 1000.0; |
+ } |
+ }; |
+}; |
+ |
})(); |