function convertTime(nTime)
{
return (nTime < 10) ? '0' + nTime : nTime;
}
setInterval(function()
{
var date1 = new Date();
var date2 = new Date();
date1 = date1.setTime(1546471283469); //2.21
date2 = date2.getTime();
var date3 = (date2 - date1);
var millisecond = parseInt(date3);
var second = parseInt(date3 / 1000) % 60;
var minute = parseInt((date3 / 60) / 1000) % 60;
var hour = parseInt(((date3 / 60) / 60) / 1000) % 24;
var res = convertTime(hour) + ':' + convertTime(minute) + ':' + convertTime(second);
console.log('Прошло: ' + res);
}, 1000);
/*
sec 1000
min 60 * 1000
hors 60 * 60 * 1000
sec 1000
min 60000
hour 3600000
*/