From df7767697798e1c2d9d1c8c777577adea7f4b342 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 12 Aug 2021 19:20:32 +0200 Subject: convert performance.now to integer before converting to BigInt --- packages/taler-wallet-core/src/util/timer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/taler-wallet-core/src/util') 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); -- cgit v1.2.3