From: Marius Gavrilescu Date: Fri, 17 Apr 2015 20:59:34 +0000 (+0300) Subject: Use Math.floor in 90-timers X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=b0b9b0278598ba852c4c82fef94b264766d9cb50;p=gruntmaster-page.git Use Math.floor in 90-timers --- diff --git a/js/90-timers.js b/js/90-timers.js index af971be..d439299 100644 --- a/js/90-timers.js +++ b/js/90-timers.js @@ -13,9 +13,9 @@ function update_timer(timer){ value = Math.max(value * 3 / 10, value * left / total); timer.innerHTML = Math.floor(value); } else { - var hours = left / 60 / 60; + var hours = Math.floor(left / 60 / 60); hours = hours < 10 ? '0' + hours : hours; - var minutes = left / 60 % 60; + var minutes = Math.floor(left / 60) % 60; minutes = minutes < 10 ? '0' + minutes : minutes; var seconds = left % 60; seconds = seconds < 10 ? '0' + seconds : seconds;