On Monday, October 20, 2014 10:29:18 AM UTC+2, Jonas Sicking wrote: > Use setTimeout if you want the timer to fire only as long as the app is still > running. For example to implement some in-game action that's supposed to > happen at a certain time. > > Use the mozAlarm API if you need the timer to fire even if the app is not > currently running. For example to display a notification to the user that > it's time to pick up your kids from school, or to synchronize emails. > > Never ever use a wake lock and setTimeout to accomplish the latter use case. > Wake locks use a lot of battery. > > / Jonas > > On Oct 15, 2014 1:58 AM, "Jan Jongboom" <[email protected]> wrote: > If I add a setTimeout() call in system, but I don't have a CPU wake lock, can > I assume that this function will be called? > > _______________________________________________ > > dev-b2g mailing list > > [email protected] > > https://lists.mozilla.org/listinfo/dev-b2g
Note that there might be a problem with this: https://bugzilla.mozilla.org/show_bug.cgi?id=1079842 _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
