JSFiddle - React, Tailwind, and code Playground
by skilldrick
JavaScript
var serverTime = 1310127993162; //this would come from the server obviously
var localTime = +Date.now();
var timeDiff = serverTime - localTime;
setInterval(function () {
console.log(+Date.now() + timeDiff);
}, 1000);