Static variables

@:value(0)staticread onlynow:Float = 0

Current time, relative to app. (number of active seconds since app was started)

staticread onlytimestamp:Float

Current unix time synchronized with ceramic Timer. Timer.now and Timer.timestamp are garanteed to get incremented exactly at the same rate, except when app frame real delta > 1s (number of seconds since January 1st, 1970)

@:value(Date.now().getTime() / 1000.0)staticread onlystartTimestamp:Float = Date.now().getTime() / 1000.0

Static methods

staticinlinedelay(owner:Null<Entity>, seconds:Float, callback:() ‑> Void):() ‑> Void

Execute a callback after the given delay in seconds.

Returns:

a function to cancel this timer delay

staticinlineinterval(owner:Null<Entity>, seconds:Float, callback:() ‑> Void):() ‑> Void

Execute a callback periodically at the given interval in seconds.

Returns:

a function to cancel this timer interval