SceneTree.createTimer

Returns a SceneTreeTimer which will SceneTreeTimer.timeout after the given time in seconds elapsed in this SceneTree. If pause_mode_process is set to false, pausing the SceneTree will also pause the timer. Commonly used to create a one-shot delay timer as in the following example:

More...
struct SceneTree
@nogc nothrow
createTimer
(
in double time_sec
,
in bool pause_mode_process = true
)

Detailed Description

func some_function(): print("start") yield(get_tree().create_timer(1.0), "timeout") print("end")

The timer will be automatically freed after its time elapses.

Meta