1
0
Fork 0

also schedule the alarm for the next day if the alarm time is less than current time

master
Sabin Iacob 2020-05-27 11:55:15 +03:00
parent 8e8e56098a
commit cb491d0678
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@
require('Storage').write('alarm.json',"[]");
} else {
var t = 3600000*(active[0].hr-hr);
if (active[0].last == time.getDate()) t += 86400000;
if (active[0].last == time.getDate() || t < 0) t += 86400000;
if (t<1000) t=1000;
/* execute alarm at the correct time. We avoid execing immediately
since this code will get called AGAIN when alarm.js is loaded. alarm.js