Skip to content
Browse files

change Date.now -> Date#getTime so IE works

  • Loading branch information...
1 parent f5405a7 commit 49e2a8b49e606d849ef8c8a95e05b961a1a9b884 @vadimg committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/client.js
View
4 lib/client.js
@@ -18,10 +18,10 @@ window.startRoom = function(room_id) {
var pingId;
function runPing() {
- var from = Date.now();
+ var from = (new Date()).getTime();
socket.emit('ping');
socket.once('pong', function() {
- var to = Date.now();
+ var to = (new Date()).getTime();
$('#ping').text(to - from);
});
pingId = setTimeout(runPing, config.PING_PERIOD*1000);

0 comments on commit 49e2a8b

Please sign in to comment.
Something went wrong with that request. Please try again.