|
@@ -0,0 +1,11 @@
|
|
|
+// makeProfileTimer
|
|
|
+function makeProfileTimer() {
|
|
|
+ let first = performance.now();
|
|
|
+ return function () {
|
|
|
+ let second = performance.now();
|
|
|
+ return second - first
|
|
|
+ };
|
|
|
+}
|
|
|
+var timer = makeProfileTimer();
|
|
|
+alert("Замеряем время работы этого alert");
|
|
|
+alert(`${timer()} ms`);
|