Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Class

Timer

class Timer

Module: System.Concurrency
Assembly: System.Runtime.dll
Source file: Timer.rvn

Inheritance: Object → Timer
Implements: Disposable

An invocation-local timer. Callbacks run serially on the invocation's completion queue. Repeating timers wait their interval after each callback completes; missed ticks do not accumulate.

Constructors

2 items
Timer(callback: () -> ()) Creates a stopped timer. The callback may capture its own state.
Timer(callback: () -> Task<void>) Creates a stopped timer. The callback may capture its own state.

Properties

1 item
IsRunning: bool Whether scheduling or callback completion is pending. Stop immediately makes this false.

Methods

8 items
Dispose() -> () Stops scheduling permanently. Repeated disposal is harmless. Implements Disposable.Dispose
Equals(other: object?) -> bool Tests reference identity by default; an ordinary class may override equality. Inherited from Object.Equals
GetHashCode() -> int Returns a stable identity hash by default; an ordinary class may override it consistently with equality. Inherited from Object.GetHashCode
GetType() -> TypeInfo Returns metadata for the concrete runtime type of this instance. Inherited from Object.GetType
Start(delay: Duration, interval: Duration) -> () Replaces the schedule, then repeats with a positive interval after each callback completes. Starting or stopping inside a callback takes precedence over the old schedule.
Start(delay: Duration) -> () Replaces the current schedule with one callback after delay. Zero runs at a later completion boundary; negative or excessive delays fault.
Stop() -> () Stops scheduling and suppresses callbacks not yet started. Harmless after disposal.
ToString() -> string Returns the concrete runtime type name for supported references, or display text from a class or boxed-struct override. Inherited from Object.ToString