aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorHolden Rohrer <holden.rohrer@gmail.com>2019-12-29 17:48:32 -0500
committerHolden Rohrer <holden.rohrer@gmail.com>2019-12-29 17:48:32 -0500
commitf3256df166f1f167fb32b3d725921a7929101dde (patch)
tree3258f56583ef4abf465d3e18f8fa73ce1a49251f /examples
parent9aba45cb5b786bed64a65e3ec8bcf304a4c97fd1 (diff)
added uptime to jarvis
Diffstat (limited to 'examples')
-rw-r--r--examples/jarvis.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/examples/jarvis.js b/examples/jarvis.js
index 7b07c52..0b24be7 100644
--- a/examples/jarvis.js
+++ b/examples/jarvis.js
@@ -57,12 +57,19 @@ function tileHandler(send, source, tiles){
}
var notif = new Space();
-notif.adhoc('\
+notifsrc = '\
\n\
For a node.js YWOT api: \n\
& http://github.com/feynmansfedora/ywot-clean \n\
-& Try `jarvis` today \n\
- ');
+& Try `jarvis` today. Uptime: UPTIME \n\
+ '
+var hrsUp = 0;
+function notifRefresh(){
+ notif.adhoc(notifsrc.replace('UPTIME', hrsUp + 'hrs'));
+ setTimeout(notifRefresh, 3600*1000);
+ hrsUp += 1;
+}
+notifRefresh();
notif.loc = [-6, 20];
var ctrl = ms(notif);