Skip to content

Commit 670f0c9

Browse files
authored
Merge pull request #9956 from Microsoft/bind-window-performance-now
In ts.performance.now, bind window.performance.now
2 parents acb003a + 1b15608 commit 670f0c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/performance.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
namespace ts {
33
declare const performance: { now?(): number } | undefined;
44
/** Gets a timestamp with (at least) ms resolution */
5-
export const timestamp = typeof performance !== "undefined" && performance.now ? performance.now : Date.now ? Date.now : () => +(new Date());
5+
export const timestamp = typeof performance !== "undefined" && performance.now ? () => performance.now() : Date.now ? Date.now : () => +(new Date());
66
}
77

88
/*@internal*/
@@ -106,4 +106,4 @@ namespace ts.performance {
106106
measures = undefined;
107107
profilerEvent = undefined;
108108
}
109-
}
109+
}

0 commit comments

Comments
 (0)