17 lines
247 B
Python
17 lines
247 B
Python
import utils
|
|
|
|
def run(ops, delay=0):
|
|
def ret():
|
|
for init, run in ops:
|
|
init()
|
|
|
|
begin = get_tick_count()
|
|
while get_tick_count()-begin < delay:
|
|
do_a_flip()
|
|
|
|
while True:
|
|
for init, run in ops:
|
|
if run():
|
|
return
|
|
return ret
|