Aligning timestamp generation.

master
Ben Burlingham 5 years ago
parent 470f0c9876
commit 35b88b9fdd
  1. 2
      client/controls.js
  2. 2
      server/ricochet.js

@ -159,7 +159,7 @@ Controls.prototype.msgCountdown = function(evt) {
const { duration, timestamp } = evt.detail.body;
const now = new Date().getTime();
const now = Date.now();
const diff = Math.ceil((now - timestamp) / 1000);
const remaining = duration - diff;

@ -304,7 +304,7 @@ Ricochet.prototype.msgSolve = function(message) {
clearTimeout(this.countdownTimer);
this.countdownTimer = setTimeout(this.onCountdownComplete.bind(this), this.countdownDuration * 1000);
this.countdownTimestamp = new Date().now();
this.countdownTimestamp = Date.now();
this.state = STATE.COUNTDOWN;

Loading…
Cancel
Save