forked from pa-pa/AskSinPP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Alarm.h
41 lines (32 loc) · 788 Bytes
/
Alarm.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//- -----------------------------------------------------------------------------------------------------------------------
// AskSin++
// 2016-10-31 papa Creative Commons - http:https://creativecommons.org/licenses/by-nc-sa/3.0/de/
//- -----------------------------------------------------------------------------------------------------------------------
#ifndef __ALARM_H__
#define __ALARM_H__
#include "Link.h"
namespace as {
class AlarmClock;
class Alarm: public Link {
protected:
~Alarm() {
}
public:
bool asyn;
uint32_t tick;
virtual void trigger(AlarmClock&) = 0;
Alarm(uint32_t t) :
asyn(false), tick(t) {
}
void set(uint32_t t) {
tick = t;
}
void async(bool value) {
asyn = value;
}
bool async() const {
return asyn;
}
};
}
#endif