pub/fnordmetric.js in fnordmetric-0.7.0 vs pub/fnordmetric.js in fnordmetric-0.7.1
- old
+ new
@@ -9,14 +9,18 @@
function decPrint(val){
return (val < 10 ? '0'+val : val);
}
function formatTimeOfDay(_time){
- var time = new Date();
- time.setTime(_time*1000);
- return decPrint(time.getHours()) + ':' +
- decPrint(time.getMinutes()) + ':' +
- decPrint(time.getSeconds());
+ if(_time === null) {
+ return "";
+ } else {
+ var time = new Date();
+ time.setTime(_time*1000);
+ return decPrint(time.getHours()) + ':' +
+ decPrint(time.getMinutes()) + ':' +
+ decPrint(time.getSeconds());
+ }
}
function formatTimeRange(range){
if (range < 60){
return parseInt(range) + ' sec';