Newer
Older
import time
def delay(func, time):
t_end = time.time() + time
while time.time() < t_end:
self.func()
print("OUT OF LOOP")
def func(self):
print("in LOOP")
if __name__ == "__main__":
print("in main")
length = 3
delay(func, length)
# testing passing a function into a function
# so dalay function can be used to stop drive robot commands