Click or drag to resize
DigitalRuneRenderContextTime Property
Gets the total elapsed time.

Namespace: DigitalRune.Graphics
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public TimeSpan Time { get; set; }

Property Value

Type: TimeSpan
The total elapsed time.
Remarks

This value can be used to control time-based animations. In effects it can be used with the Time semantic.

This value is automatically set by the graphics service. It is computed by continuously summing up the DeltaTime values.

Important:
If the time in seconds is cast to a single precision floating point number (Single), then it will become unusable after several hours or days - depending on the required resolution. Therefore, this value must be reset regularly in long-running applications. To reset the time just set this property back to

TimeSpan.Zero
. It is best to reset this value when the user does not notice the change, i.e. when entering a new level or a full-screen menu.

See Also