update method

TaskQueue update()

Updates the internal state of the task queue. Should be called per simulation step.

Implementation

TaskQueue update() {
	if ( tasks.isNotEmpty ) {
		if ( _active == false ) {
        stopwatch.reset();
        stopwatch.start();
			taskHandle = Future.delayed(Duration.zero, _handler).timeout(options,onTimeout: (){stopwatch.stop();});//requestIdleCallback( _handler, options );
			_active = true;
		}
	}
    else {
		_active = false;
	}
	return this;
}