isExpired

.isExpired()

Returns true if this Timer has expired, and false if not.

It has expired if the amount of time left on the Timer has run out.

/* 
 * Runs the timer, until it expires.
 * Left click to reset.
 */

timer = new Timer( 5000 )

onEachFrame() do
    if timer.isExpired()
        if getControls().isLeftClick()
            timer.reset()
        end
        
        text = "EXPIRED! Click to reset"
    else
        text = timer.getDurationLeft()
    end
    
    fill( :white )
    
    setColor( :pink )
    fillText( text, 10, 10, :left, :top )
end