diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-04-28 22:18:25 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-04-28 22:18:25 -0700 |
commit | 5b61f2b4b6aa7f55962b41e532d9c2bad7c97e78 (patch) | |
tree | 3ccd222591f94037bcfbc1727bbeace85c724736 | |
parent | 7aa769417142cbacaf433c19a4eaf3f4759a9095 (diff) |
some browser debugging stuff
-rw-r--r-- | src/library_browser.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/library_browser.js b/src/library_browser.js index a6a420fa..48b6d8af 100644 --- a/src/library_browser.js +++ b/src/library_browser.js @@ -144,3 +144,17 @@ mergeInto(LibraryManager.library, { } }); +/* Useful stuff for browser debugging + +function slowLog(label, text) { + if (!slowLog.labels) slowLog.labels = {}; + if (!slowLog.labels[label]) slowLog.labels[label] = 0; + var now = Date.now(); + if (now - slowLog.labels[label] > 1000) { + Module.print(label + ': ' + text); + slowLog.labels[label] = now; + } +} + +*/ + |