diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2014-02-23 15:44:34 -0800 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2014-02-23 15:44:34 -0800 |
commit | e61733e9b92758e807a6587e906cdce477307ca3 (patch) | |
tree | 37f6531e7fccad27c199d8c20b376acabbbaf66a /tempo.js | |
parent | cf9cdaade95defa2e78b5bd78105a072f028eefc (diff) | |
download | tempo-e61733e9b92758e807a6587e906cdce477307ca3.tar.gz tempo-e61733e9b92758e807a6587e906cdce477307ca3.tar.xz |
Align timer interval with start of second.
Diffstat (limited to 'tempo.js')
-rw-r--r-- | tempo.js | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -29,7 +29,8 @@ function updateTime() { function startTempo() { updateTime(); - setInterval(updateTime, 1000); + setTimeout(function() {updateTime(); setInterval(updateTime, 1000)}, + 1000 - new Date().getTime() % 1000); } window.onload = startTempo; |