One-shot timer.
    public abstract class SceneTreeTimer : Reference

A one-shot timer managed by the scene tree, which emits timeout on completion. See also SceneTree.CreateTimer(float, bool).

As opposed to Timer, it does not require the instantiation of a node. Commonly used to create a one-shot delay timer as in the following example:

[codeblock]

func some_function():

print(“Timer started.”)

yield(get_tree().create_timer(1.0), “timeout”)

print(“Timer ended.”)

[/codeblock]

Inheritance Chain

Signals

    "timeout" ()

Emitted when the timer reaches 0.

Properties

    public float TimeLeft { get; set; }

The time remaining.

Methods

    [Obsolete("GetTimeLeft is deprecated. Use the TimeLeft property instead.")]
    public float GetTimeLeft()

Getter for TimeLeft

    [Obsolete("SetTimeLeft is deprecated. Use the TimeLeft property instead.")]
    public void SetTimeLeft(float time)

Setter for TimeLeft

Tags: