Click or drag to resize
DigitalRuneFixedStepTimerAccumulateTimeSteps Property
Gets or sets a value indicating whether the time steps are accumulated.

Namespace: DigitalRune.Game.Timing
Assembly: DigitalRune.Game (in DigitalRune.Game.dll) Version: 1.4.0.0 (1.4.0.14427)
Syntax
public bool AccumulateTimeSteps { get; set; }

Property Value

Type: Boolean
if time steps are accumulated; otherwise, . The default value is .
Remarks

When this value is (default) and a time interval greater than the StepSize has passed then TimeChanged event can be triggered with a DeltaTime that is an integer multiple of the StepSize.

In contrast: If this value is , then the TimeChanged event is always trigged with a DeltaTime that is equal to StepSize. If a timer interval greater than StepSize has passed, several TimeChanged events will be triggered in a row.

If AccumulateTimeSteps is then the method that handles the TimeChanged event can be sure that the DeltaTime is always constant. The disadvantage is that multiple TimeChanged events can be triggered in a sequence which might not be optimal for performance (i.e. overhead in the event handler could be executed more often than necessary).

See Also