PrecisionTimer Class

Represents a high-resolution timer and timestamp class.

Definition

Namespace: Gemstone
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.128 -- Release Build+d050cfc5563c89a1188cc3c6b2d417530856f490
public class PrecisionTimer : IDisposable
Inheritance
Object    PrecisionTimer
Implements
IDisposable

Remarks

For Windows deployments, implementation is based on the Windows multimedia timer. For other deployments, e.g., POSIX, implementation uses a basic timer for compatibility - this should have ~10ms of resolution when used on standard Linux systems.

Constructors

PrecisionTimer Initializes a new instance of the PrecisionTimer class.

Properties

AutoReset Gets or sets a value indicating whether the PrecisionTimer should raise the Tick event each time the specified period elapses or only after the first time it elapses.
Capabilities Gets the system multimedia timer capabilities.
EventArgs Gets EventArgs specified in Start(EventArgs) used to pass into Tick event.
IsRunning Gets a value indicating whether the PrecisionTimer is running.
Period Gets or sets the time between Tick events, in milliseconds.
Resolution Gets or sets the PrecisionTimer resolution, in milliseconds.

Methods

ClearMinimumTimerResolution Clears a previously set minimum timer resolution established using SetMinimumTimerResolution(Int32).
Dispose Releases all the resources used by the PrecisionTimer object.
Dispose(Boolean) Releases the unmanaged resources used by the PrecisionTimer object and optionally releases the managed resources.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Finalize Releases the unmanaged resources before the PrecisionTimer object is reclaimed by GC.
(Overrides ObjectFinalize)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
SetMinimumTimerResolution Requests a minimum resolution for periodic timers such as the PrecisionTimer.
Start Starts the PrecisionTimer.
Start(EventArgs) Starts the PrecisionTimer with the specified EventArgs.
Stop Stops PrecisionTimer.
ToStringReturns a string that represents the current object.
(Inherited from Object)

Events

Started Occurs when the PrecisionTimer has started.
Stopped Occurs when the PrecisionTimer has stopped.
Tick 

Extension Methods

GetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
GetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)

See Also