diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/jarvis.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/examples/jarvis.js b/examples/jarvis.js index 73a39e5..433d2b0 100644 --- a/examples/jarvis.js +++ b/examples/jarvis.js @@ -48,7 +48,7 @@ function init(){ } function initOnce(){ - notifRefresh(); + timect(); } function tileHandler(send, source, tiles){ @@ -82,8 +82,12 @@ function notifRefresh(){ notif = newnotif; writes.enqueue(...diff.towrite()); ctrl = ms(notif); - setTimeout(notifRefresh, 60*1000); - minsUp += 1; +} + +function timect(){ + minsUp++; + notifRefresh(); + setTimeout(timect, 60*1000); } function protectArea(send, tiles, locs){ |