aboutsummaryrefslogtreecommitdiff
path: root/examples/jarvis.js
diff options
context:
space:
mode:
Diffstat (limited to 'examples/jarvis.js')
-rw-r--r--examples/jarvis.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/jarvis.js b/examples/jarvis.js
index 3c985bb..3ea829a 100644
--- a/examples/jarvis.js
+++ b/examples/jarvis.js
@@ -67,19 +67,19 @@ notifsrc = '\
& http://github.com/feynmansfedora/ywot-clean \n\
& Try `jarvis` today. Uptime: UPTIME \n\
'
-var hrsUp = 0;
+var minsUp = 0;
var ctrl;
function notifRefresh(){
let newnotif = new Space();
newnotif.loc = [-6, 20];
- newnotif.adhoc(notifsrc.replace('UPTIME', hrsUp + 'hrs'));
+ newnotif.adhoc(notifsrc.replace('UPTIME', Math.floor(minsUp/60) + 'h' + minsUp%60 + 'm'));
let diff = newnotif.copy();
if (typeof notif !== 'undefined') diff.comb(notif, comb.sub);
notif = newnotif;
writes.enqueue(...diff.towrite());
ctrl = ms(notif);
setTimeout(notifRefresh, 3600*1000);
- hrsUp += 1;
+ minsUp += 1;
}
function protectArea(send, tiles, locs){