projects
/
saartuer.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge branch 'master' of ralfj.de:saartuer
[saartuer.git]
/
waker.py
1
from libtuer import ThreadRepeater
2
from statemachine import StateMachine
3
4
class Waker():
5
def __init__(self, sm):
6
self._sm = sm
7
self._t = ThreadRepeater(self._wake, 0.5, name="Waker")
8
9
def _wake(self):
10
self._sm.callback(StateMachine.CMD_WAKEUP)
11
12
def stop(self):
13
self._t.stop()