Click or drag to resize
DigitalRuneIGameTimerAccumulatedTime Property
Gets the accumulated time.

Namespace: DigitalRune.Game.Timing
Assembly: DigitalRune.Game (in DigitalRune.Game.dll) Version: 1.4.0.0 (1.4.0.14427)
Syntax
TimeSpan AccumulatedTime { get; }

Property Value

Type: TimeSpan
The accumulated time.
Remarks

Some game timers can be configured to start a new time step only at certain intervals. For example, the FixedStepTimer only performs time steps at a fixed time interval such as 1/60 seconds (see StepSize). When a time step is preformed (TimeChanged is raised), AccumulatedTime indicates the current elapsed time that exceeds the interval size. When an Idle event is raised, AccumulatedTime indicates the elapsed since the last TimeChanged event. AccumulatedTime is always less than the configured time interval for time steps.

For example: A fixed step timer is configured to perform time steps at 1 second intervals. If the timer is updated by the clock and exactly 1 second has passed, TimeChanged is raised and AccumulatedTime is 0. If 1.3 seconds have passed since the last time step, TimeChanged is raised and AccumulatedTime is 0.3 seconds. During Idle events, AccumulatedTime is equal to the time step interval minus the IdleTime.

See Also