17 lines
261 B
C++
17 lines
261 B
C++
|
#include "thread/Timer.h"
|
||
|
#include "thread/Clock.h"
|
||
|
|
||
|
void Timer::disarm()
|
||
|
{
|
||
|
if (active_clock) active_clock->remove_from_timer_queue(this);
|
||
|
}
|
||
|
|
||
|
void Timer::arm(Clock* c, u64 ticks)
|
||
|
{
|
||
|
disarm();
|
||
|
|
||
|
delta_ticks = ticks;
|
||
|
|
||
|
c->add_to_timer_queue(this);
|
||
|
}
|