Progress: Entity Interpolation

This commit is contained in:
Jeremiah Billmann
2013-06-21 20:55:55 -04:00
parent 7f3c9219ba
commit 71d9eb8e75
+2 -2
View File
@@ -41,7 +41,7 @@ window.GarageServerIO = (function (window, socketio) {
}
});
socket.on('ping', function(data) {
pingDelay = new Date() - Date.parse(data);
pingDelay = new Date().getTime() - data;
if (options.logging) {
console.log('garageserver.io:: socket ping delay ' + pingDelay);
}
@@ -60,7 +60,7 @@ window.GarageServerIO = (function (window, socketio) {
interval = options.pingInterval;
}
setInterval(function (){
socket.emit('ping', new Date());
socket.emit('ping', new Date().getTime());
}, interval);
},