From f3256df166f1f167fb32b3d725921a7929101dde Mon Sep 17 00:00:00 2001 From: Holden Rohrer Date: Sun, 29 Dec 2019 17:48:32 -0500 Subject: added uptime to jarvis --- examples/jarvis.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'examples/jarvis.js') 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); -- cgit