Skip to content

Commit

Permalink
Fixed comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
sykeben committed Apr 7, 2019
1 parent 5cfd6b2 commit 6abc998
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 1 addition & 5 deletions public/javascript/dash_0.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ function setOnline(value) {
online = value;
}


// new code
// Have dash update every second after finishing.
const setIntervalAsync = (fn, ms) => {
fn().then(() => {
setTimeout(() => setIntervalAsync(fn, ms), ms);
Expand All @@ -145,8 +144,5 @@ const delay = deplayMs => new Promise((resolve) => {

setIntervalAsync(async () => { periodicUpdate(); await delay(1000); }, 1000);

// Make dash periodically update every second.
//window.setInterval(periodicUpdate, 1000);

// Make dash update upon load.
window.onload = periodicUpdate;
3 changes: 1 addition & 2 deletions public/javascript/dash_1.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ function setOnline(value) {
online = value;
}


// new code
// Have dash update every second after finishing.
const setIntervalAsync = (fn, ms) => {
fn().then(() => {
setTimeout(() => setIntervalAsync(fn, ms), ms);
Expand Down

0 comments on commit 6abc998

Please sign in to comment.