Numworks Epsilon
1.4.1
Graphing Calculator Operating System
timer.cpp
Go to the documentation of this file.
1
#include <
escher/timer.h
>
2
3
Timer::Timer
(
uint32_t
period) :
4
m_period(period),
5
m_numberOfTicksBeforeFire(period)
6
{
7
}
8
9
bool
Timer::tick
() {
10
m_numberOfTicksBeforeFire--;
11
if
(m_numberOfTicksBeforeFire == 0) {
12
bool
needRedraw =
fire
();
13
reset
();
14
return
needRedraw;
15
}
16
return
false
;
17
}
18
19
void
Timer::reset
() {
20
m_numberOfTicksBeforeFire = m_period;
21
}
Timer::tick
bool tick()
Definition:
timer.cpp:9
timer.h
Timer::fire
virtual bool fire()=0
uint32_t
unsigned int uint32_t
Definition:
stdint.h:6
Timer::Timer
Timer(uint32_t period)
Definition:
timer.cpp:3
Timer::reset
void reset()
Definition:
timer.cpp:19
epsilon
escher
src
timer.cpp
Generated by
1.8.14