mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-27 07:01:32 +00:00
21 lines
504 B
C++
21 lines
504 B
C++
|
#include <mesosphere/interfaces/IAlarmable.hpp>
|
||
|
#include <mesosphere/core/KCoreContext.hpp>
|
||
|
#include <mesosphere/interrupts/KAlarm.hpp>
|
||
|
|
||
|
namespace mesosphere
|
||
|
{
|
||
|
|
||
|
void IAlarmable::SetAlarmTimeImpl(const KSystemClock::time_point &alarmTime)
|
||
|
{
|
||
|
this->alarmTime = alarmTime;
|
||
|
KCoreContext::GetCurrentInstance().GetAlarm()->AddAlarmable(*this);
|
||
|
}
|
||
|
|
||
|
void IAlarmable::ClearAlarm()
|
||
|
{
|
||
|
KCoreContext::GetCurrentInstance().GetAlarm()->RemoveAlarmable(*this);
|
||
|
alarmTime = KSystemClock::time_point{};
|
||
|
}
|
||
|
|
||
|
}
|