Skip to content

Commit 95829cb

Browse files
committed
Enabled latency stats
1 parent b5682bf commit 95829cb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
<div class="container">
2727
<div id="demo">This is a demo only! Download and serve the repo locally to test the gamepad</div>
2828
<div id="stats">
29-
lat:
3029
</div>
3130
<p>Socket Joy Alpha</p>
3231
<div class="bumpers">

socketjoy.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ if (isLocal) {
2222
lat = 0;
2323
sock.on('pong', function(ms) {
2424
lat = ms;
25-
document.getElementById("stats").innerHTML = "lat: " + ms + "ms";
25+
document.getElementById("stats").innerHTML = "latency: " + ms + "ms";
26+
document.getElementById("stats").style.display = "block";
2627
});
2728
} else {
2829
// Notify user that this is a demo only

0 commit comments

Comments
 (0)