Click or drag to resize
DigitalRuneHighPrecisionClock Class
Accurately measures the time by using the system's performance counter. (Not available in Silverlight.)
Inheritance Hierarchy
SystemObject
  DigitalRune.Game.TimingHighPrecisionClock

Namespace: DigitalRune.Game.Timing
Assembly: DigitalRune.Game (in DigitalRune.Game.dll) Version: 1.4.0.0 (1.4.0.14427)
Syntax
public class HighPrecisionClock : IGameClock

The HighPrecisionClock type exposes the following members.

Constructors
  NameDescription
Public methodHighPrecisionClock
Initializes a new instance of the HighPrecisionClock class.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnTimeChanged
Raises the TimeChanged event.
Public methodReset
Stops the clock and resets all times to 0.
Public methodResetDeltaTime
Resets the time measurement for the current DeltaTime. The next DeltaTime will be the time since ResetDeltaTime was called.
Public methodStart
Starts/resumes the clock.
Public methodStop
Pauses the clock.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdate
Updates the time (needs to be called regularly).
Top
Properties
  NameDescription
Public propertyDeltaTime
Gets the amount of time that has elapsed since the last TimeChanged event.
Public propertyGameTime
Gets the game time, which is the sum of all DeltaTime values.
Public propertyIsRunning
Gets a value indicating whether the clock is running.
Public propertyMaxDeltaTime
Gets the max limit for DeltaTime.
Public propertyTotalTime
Gets the duration (wall clock time) for which the clock is running.
Top
Events
  NameDescription
Public eventTimeChanged
Occurs when the time changed.
Top
Remarks

The method Update has to be called regularly to trigger TimeChanged events.

The HighPrecisionClock by default uses a performance counter to accurately measure time. If no performance counter is available, the system timer is used to measures elapsed time.

See IGameClock for more information.

See Also