time.schedule_repeating method
Repeats execution of a function every period
.
Example
ellipsoid = scene.create_ellipsoid(Vector3(0, 0, 0))
def say_time(dt):
ellipsoid.speech = f"{round(time.current_time,1)} seconds have passed."
time.schedule_repeating(say_time, 1)
Parameters
-
func: Callable[[deltaTime: float], None]
function to execute repeatedly.
-
period: float
period in seconds. Default is
0
, causing script to be repeated every frame.