diff options
author | Florian Dold <florian@dold.me> | 2021-08-12 19:20:32 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-08-12 19:20:48 +0200 |
commit | df7767697798e1c2d9d1c8c777577adea7f4b342 (patch) | |
tree | bfeb8ff69f54225f7dd80239255be322d7859ae5 | |
parent | abbf899b97ed09f215455be3cab8501b5da92860 (diff) |
convert performance.now to integer before converting to BigInt
-rw-r--r-- | packages/taler-wallet-core/src/util/timer.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/util/timer.ts b/packages/taler-wallet-core/src/util/timer.ts index 7c849fbcc..d9fe3439b 100644 --- a/packages/taler-wallet-core/src/util/timer.ts +++ b/packages/taler-wallet-core/src/util/timer.ts @@ -91,7 +91,7 @@ export const performanceNow: () => bigint = (() => { // @ts-ignore if (typeof performance !== "undefined") { // @ts-ignore - return () => BigInt(performance.now()) * BigInt(1000 * 1000); + return () => BigInt(Math.floor(performance.now() * 1000)) * BigInt(1000); } return () => BigInt(0); |