function getTime(msec, useString) {
var nSec = Math.floor(msec/1000),
hh = Math.floor(nSec/3600),
min = Math.floor(nSec/60) - Math.floor(hh * 60),
sec = Math.floor(nSec -(hh*3600) -(min*60));
return (useString ? ((hh ? hh + ':' : '') + (hh && min < 10 ? '0' + min : min) + ':' + ( sec < 10 ? '0' + sec : sec ) ) : { 'min': min, 'sec': sec });
}