Reputation: 23
I created a Chrome Extension that should make some checks every 24 hours
var oneDayInMinutes = 24*60*60;
chrome.alarms.create('checkState', {periodInMinutes: oneDayInMinutes});
What happens to this alarm when the system goes to standby? Is it fired about 24h after it was set, it's shifted by the time the system was in standby mode or it's turned off or disabled in some way?
Upvotes: 2
Views: 269
Reputation: 77571
It is supposed to fire at earliest 24h after it was set. If the time was missed, it should notice and fire anyway.
There is, however, an open bug indicating that, at least in OS X and for short time periods after the system wakes, the alarm may be shifted by the time system was asleep. I suppose this corrects itself after a while - but don't quote me on that.
You can work around the bug by listening to chrome.idle
events and re-creating alarms after wake.
Upvotes: 1