aboutsummaryrefslogtreecommitdiff
path: root/plugin/notes
diff options
context:
space:
mode:
authorAdam Spiers <github@adamspiers.org>2016-04-16 18:11:48 +0100
committerAdam Spiers <github@adamspiers.org>2017-04-20 15:18:15 +0100
commit933eba8789f9702ff6db76c4310f7b21db14a7b9 (patch)
treef9dddbd4bdf52bd65abb140007b69a98e439623a /plugin/notes
parent1eada3b3600f6ae3ecda4edec877571b409c61c8 (diff)
downloadperl-software-in-gnu-guix-933eba8789f9702ff6db76c4310f7b21db14a7b9.tar
perl-software-in-gnu-guix-933eba8789f9702ff6db76c4310f7b21db14a7b9.tar.gz
round decreasing timers to mirror increasing timers
Diffstat (limited to 'plugin/notes')
-rw-r--r--plugin/notes/notes.html7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugin/notes/notes.html b/plugin/notes/notes.html
index 15bca19..34f6073 100644
--- a/plugin/notes/notes.html
+++ b/plugin/notes/notes.html
@@ -464,9 +464,10 @@
secondsEl = timeEl.querySelector( '.seconds-value' );
function _displayTime( hrEl, minEl, secEl, time) {
- var hours = Math.floor( time / ( 1000 * 60 * 60 ) );
- var minutes = Math.floor( ( time / ( 1000 * 60 ) ) % 60 );
- var seconds = Math.floor( ( time / 1000 ) % 60 );
+ time = Math.round(time / 1000);
+ var seconds = time % 60;
+ var minutes = ( time / 60 ) % 60 ;
+ var hours = time / ( 60 * 60 ) ;
hrEl.innerHTML = zeroPadInteger( hours );
if (hours == 0) {
hrEl.classList.add( 'mute' );