const_delay: remove

pull/25/head
Jan Pochyla 7 years ago
parent e937afcce8
commit c422453e82

@ -1,12 +0,0 @@
import utime
class ConstDelay:
def __init__(self, delay):
self.delay = delay
self.last_run = utime.ticks_us()
def wait(self):
# FIXME - use loop.call_at instead of call_later to avoid multiple time handling
delay = 2 * self.delay - (utime.ticks_us() - self.last_run)
self.last_run = utime.ticks_us()
return delay
Loading…
Cancel
Save