Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion js/lib/publisher.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async function publisherRoutine(
while (isRunningRef.value) {
let msg = payload;
if (measureRTT) {
msg = process.hrtime.bigint() / 1000;
msg = process.hrtime.bigint() / 1000n;
}

for (const channel of channels) {
Expand Down
2 changes: 1 addition & 1 deletion js/lib/subscriber.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ async function subscriberRoutine(

if (measureRTT) {
try {
const now = BigInt(Date.now()) * 1000n;
const now = process.hrtime.bigint() / 1000n;
const timestamp = BigInt(message); // µs
const rtt = now - timestamp;

Expand Down