monotonic performance.now

This commit is contained in:
Luca Casonato
2021-05-08 02:35:30 +02:00
parent 0e82dcb8b9
commit 96e69d2458
+2 -2
View File
@@ -8,10 +8,10 @@ export { extname } from "https://deno.land/std@0.95.0/path/mod.ts";
export * as oak from "https://deno.land/x/oak@v7.4.0/mod.ts";
// -- esbuild --
const start = new Date().getTime();
let now = 1;
globalThis.performance = {
now() {
const now = new Date().getTime() - start;
now++;
console.log(now);
return now;
},