Right now, I have this on my page:
You can also use an interval to do what you want.
var tstamp = 0; function timer() { console.log(tstamp); tstamp = new Date().getTime() } var i = setInterval(timer, 1000); //when no more needed clearInterval(i)