aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolden Rohrer <holden.rohrer@gmail.com>2019-12-29 20:28:56 -0500
committerHolden Rohrer <holden.rohrer@gmail.com>2019-12-29 20:28:56 -0500
commit91e703aaf0c0d547fc550dec2815ae8847e9c547 (patch)
treeb860b9614e03a51a18c791dc77ed79d09289cda6
parent554a50cfb5f7eaf093b6d4f73e53dac056909344 (diff)
switched jarvis uptime hrs to mins
-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){