We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8a13be commit 5ea434bCopy full SHA for 5ea434b
packages/scheduler/src/forks/SchedulerPostTaskOnly.js
@@ -39,17 +39,10 @@ import {
39
40
import {enableIsInputPending} from '../SchedulerFeatureFlags';
41
42
-let getCurrentTime;
43
-const hasPerformanceNow =
44
- typeof performance === 'object' && typeof performance.now === 'function';
45
-
46
-if (hasPerformanceNow) {
47
- const localPerformance = performance;
48
- getCurrentTime = () => localPerformance.now();
49
-} else {
50
- const localDate = Date;
51
- const initialTime = localDate.now();
52
- getCurrentTime = () => localDate.now() - initialTime;
+const perf = window.performance;
+
+function getCurrentTime() {
+ return perf.now();
53
}
54
55
// Max 31 bit integer. The max integer size in V8 for 32-bit systems.
0 commit comments