sched/clkinfo: schedule an alarm via `setAlarm`

... to ensure timers are scheduled from now
master
Rob Pilling 2024-09-22 21:55:26 +01:00
parent 6657d34123
commit 594d08bf60
1 changed files with 6 additions and 2 deletions

View File

@ -127,9 +127,13 @@
run: function() {
if (a.date) return; // ignore events
a.on = !a.on;
if (a.on) {
// use sched to start the alarm,
// so it takes care of timers etc
alarm.setAlarm(a.id, a);
}
this.emit("redraw");
alarm.setAlarms(all);
alarm.reload();
alarm.reload(); // schedule/unschedule the alarm
}
})),
};