Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ryan778
GitHub Repository: Ryan778/Ryan778.github.io
Path: blob/master/emojionearea/src/function/calcElapsedTime.js
576 views
1
define(function() {
2
return function(label, blockCallback, condition) {
3
var end_at, started_at = performance.now();
4
blockCallback.call(this);
5
end_at = performance.now();
6
if (condition || condition === undefined) {
7
console.log("Call to \"" + label + "\" took " + (end_at - started_at) + " milliseconds.")
8
}
9
}
10
});
11