comparison py/tempserver.py @ 442:02318c9660cd

copied fridge logic from main.c
author Matt Johnston <matt@ucc.asn.au>
date Tue, 20 Nov 2012 22:03:10 +0800
parents 31ac84425a2d
children 482d7852b511
comparison
equal deleted inserted replaced
441:9fbeafc09845 442:02318c9660cd
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():