Web based Jalousie control.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

27 lines
630 B

  1. '''
  2. Created on 24.06.2014
  3. @author: volkma_s
  4. '''
  5. from threading import Timer
  6. class mc_timer():
  7. def __init__(self):
  8. self.timer = None
  9. pass
  10. def StartTimer(self, value, EventQueue, Event):
  11. print("Start Timer {}".format(value))
  12. self.EventQueue = EventQueue
  13. self.Event = Event
  14. self.timer = Timer(value,self.expired, args=['WOW'])
  15. self.timer.start()
  16. def StopTimer(self):
  17. if self.timer != None:
  18. self.timer.cancel()
  19. def expired(self, message):
  20. self.EventQueue.put(self.Event )