dist/carrot.js
/**
     * The internal update loop of the timed event. It is managed automatically by {@link Carrot.Time}.
     * @method Carrot.Timer#_update
     * @private
     */
The internal update loop of the timed event. It is managed automatically by  Carrot.Time.
The internal update loop of the timed event . It is managed automatically by Carrot . Time .
_update()
    {
        if (this.isRunning)
        {
            if (this.time.now >= this.endTime)
            {
                this.callback();
                this.timesExecuted += 1;
                if (this.timesToRepeat !== -1
                 && this.timesExecuted > this.timesToRepeat)
                {
                    this.destroy();
                }
                else
                {
                    this.endTime = this.time.now + this.delay;
                }
            }
        }
    }
_update ( ) { if ( this . isRunning ) { if ( this . time . now >= this . endTime ) { this . callback ( ) ; this . timesExecuted += 1 ; if ( this . timesToRepeat !== - 1 && this . timesExecuted > this . timesToRepeat ) { this . destroy ( ) ; } else { this . endTime = this . time . now + this . delay ; } } } }
The internal update loop of the timed event.
The internal update loop of the timed event .
//console.log("time passed since start: ", this.time.now - this.startTime) // If desired repeats are reached, stop the timer. // If not, repeat.