Skip to content

Commit bdca91d

Browse files
Fix time conversions on the subscriber side
1 parent 697aef5 commit bdca91d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/lib/subscriber.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ async function subscriberRoutine(
7070

7171
if (measureRTT) {
7272
try {
73-
const now = BigInt(Date.now()) * 1000n;
73+
const now = process.hrtime.bigint() / 1000;
7474
const timestamp = BigInt(message); // µs
7575
const rtt = now - timestamp;
7676

0 commit comments

Comments
 (0)