Mercurial > templog
comparison py/tempserver.py @ 143:0895f5ad7731
copied fridge logic from main.c
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 20 Nov 2012 22:03:10 +0800 |
parents | 4755e6f9a5b8 |
children | 482d7852b511 |
comparison
equal
deleted
inserted
replaced
142:8375616bbc7b | 143:0895f5ad7731 |
---|---|
35 return current | 35 return current |
36 | 36 |
37 def set_current(self, wort, fridge, ambient): | 37 def set_current(self, wort, fridge, ambient): |
38 current = (wort, fridge, ambient) | 38 current = (wort, fridge, ambient) |
39 | 39 |
40 def uptime(self): | |
41 return utils.monotonic_time() - self.start_time() | |
42 | |
43 def now(self): | 40 def now(self): |
44 return utils.monotonic_time() | 41 return utils.monotonic_time() |
45 | 42 |
46 def spawn_timer(seconds, fn, *args, **kwargs): | 43 def spawn_timer(seconds, fn, *args, **kwargs): |
47 def loop(): | 44 def loop(): |