make it look normal

This commit is contained in:
2026-05-09 22:06:05 +02:00
parent 7eec03a811
commit 4b6244eb01
+1 -1
View File
@@ -95,7 +95,7 @@ function handleMessage(msg) {
if(msg.time && timeOffset != 0) { if(msg.time && timeOffset != 0) {
const now = performance.now() / 1000; const now = performance.now() / 1000;
const lag = now - (msg.time + timeOffset); const lag = now - (msg.time + timeOffset);
document.getElementById("ping-status").textContent = lag * 1000; document.getElementById("ping-status").textContent = (Math.max(lag, 0) * 1000).toFixed(2);
} }
switch (msg.event) { switch (msg.event) {
case "time": { case "time": {