mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[apps] Timers access the shared container directly
This commit is contained in:
committed by
EmilieNumworks
parent
652cbae9ac
commit
5548767809
@@ -1,16 +1,16 @@
|
||||
#include "suspend_timer.h"
|
||||
#include "apps_container.h"
|
||||
|
||||
SuspendTimer::SuspendTimer(AppsContainer * container) :
|
||||
Timer(k_idleBeforeSuspendDuration/Timer::TickDuration),
|
||||
m_container(container)
|
||||
SuspendTimer::SuspendTimer() :
|
||||
Timer(k_idleBeforeSuspendDuration/Timer::TickDuration)
|
||||
{
|
||||
}
|
||||
|
||||
bool SuspendTimer::fire() {
|
||||
/* We could just call m_container->suspend(), but we want to notify all
|
||||
/* We could just call container->suspend(), but we want to notify all
|
||||
* responders in the responder chain that the calculator will be switched off,
|
||||
* so we use an event to switch off the calculator. */
|
||||
m_container->dispatchEvent(Ion::Events::OnOff);
|
||||
AppsContainer * container = AppsContainer::sharedAppsContainer();
|
||||
container->dispatchEvent(Ion::Events::OnOff);
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user