class
Godot::TimerHandle
- Godot::TimerHandle
- Reference
- Object
Overview
A handle representing an active recurring or delayed timer. Provides inspection and early cancellation/pausing capabilities.
Defined in:
libgodot/timer.crConstructors
Instance Method Summary
-
#advance(delta : Float64) : Bool
Advances time by delta, returning true if the timer should tick
-
#cancel : Void
Cancels the timer immediately.
- #cancelled? : Bool
-
#elapsed : Float64
Alias for elapsed_time
- #elapsed_time : Float64
-
#finished? : Bool
Returns true if the timer has finished (either cancelled or stopped)
- #interval_sec : Float64
- #node : Godot::Node | Nil
-
#pause : Void
Temporarily pauses tick accumulation
- #paused? : Bool
-
#record_tick! : Int64
Explicitly registers a tick event and increments tick_count
-
#reset : Void
Resets elapsed time and tick counter
-
#resume : Void
Resumes tick accumulation
- #running? : Bool
-
#stop : Void
Alias for cancel
- #tick_count : Int64
-
#time_left : Float64
Returns estimated remaining time before next tick
Instance methods inherited from class Object
try?(&)try? try?
Constructor Detail
def self.new(interval_sec : Float64, node : Godot::Node | Nil = nil, timer : Godot::Timer | Nil = nil, scene_tree_timer : Godot::SceneTreeTimer | Nil = nil)
#
Instance Method Detail
Advances time by delta, returning true if the timer should tick