turtle.ontimer()¶
-
turtle.ontimer(fun, t=0)¶ Install a timer, which calls fun after t milliseconds.
Arguments: fun – a function with no arguments. t – a number >= 0
Example:
>>> running = True >>> def f(): ... if running: ... fd(50) ... lt(60) ... ontimer(f, 250) ... >>> f() # makes the turtle marching around >>> running = False