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.
performance.now
1 parent e976756 commit a6dfca9Copy full SHA for a6dfca9
.changeset/fancy-vans-shave.md
@@ -0,0 +1,5 @@
1
+---
2
+"effect": patch
3
4
+
5
+Ensure `performance.now` is only used if it's available
packages/effect/src/internal/clock.ts
@@ -40,7 +40,7 @@ export const globalClockScheduler: Clock.ClockScheduler = {
40
41
const performanceNowNanos = (function() {
42
const bigint1e6 = BigInt(1_000_000)
43
- if (typeof performance === "undefined") {
+ if (typeof performance === "undefined" || typeof performance.now !== "function") {
44
return () => BigInt(Date.now()) * bigint1e6
45
}
46
let origin: bigint
0 commit comments