Represents a high resolution timer that allows precise timing even with sub-milliseconds intervals.
The timer executes on a separated high priority thread.
Inheritance Hierarchy
KGySoft.CoreLibrariesHiResTimer
Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 7.0.0-preview.3
Syntax
The HiResTimer type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | HiResTimer |
Initializes a new instance of the HiResTimer class with 1ms interval.
|
![]() | HiResTimer(Single) |
Initializes a new instance of the HiResTimer class with a specified interval.
|
Properties
Name | Description | |
---|---|---|
![]() | Enabled | |
![]() | IgnoreElapsedThreshold |
Gets or sets a threshold value, in milliseconds, to ignore an Elapsed event (and thus trying to catch up the timer)
if the next invoke is late by the given value. Value must not be zero but fractions are allowed.
Default value: +∞. |
![]() | Interval |
Methods
Name | Description | |
---|---|---|
![]() | Start |
Starts raising the Elapsed event by enabling the timer.
|
![]() | Stop |
Stops raising the Elapsed event by disabling the timer.
|
Events
Name | Description | |
---|---|---|
![]() | Elapsed |
Occurs when the Interval elapses.
|
Extension Methods
Name | Description | |
---|---|---|
![]() | Convert(Type, CultureInfo) | Overloaded.
Converts an Object specified in the obj parameter to the desired targetType.
(Defined by ObjectExtensions.)See the Examples section of the generic ConvertTTarget(Object, CultureInfo) overload for an example. |
![]() ![]() | ConvertTTarget(CultureInfo) | Overloaded.
Converts an Object specified in the obj parameter to the desired TTarget.
(Defined by ObjectExtensions.)See the Remarks section for details. |
![]() | In |
Gets whether item is among the elements of set.
(Defined by ObjectExtensions.)See the Examples section of the generic InT(T, T) overload for an example. |
![]() | TryConvert(Type, Object) | Overloaded.
Tries to convert an Object specified in the obj parameter to the desired targetType.
(Defined by ObjectExtensions.)See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example. |
![]() | TryConvert(Type, CultureInfo, Object) | Overloaded.
Tries to convert an Object specified in the obj parameter to the desired targetType.
(Defined by ObjectExtensions.)See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example. |
![]() | TryConvertTTarget(TTarget) | Overloaded.
Tries to convert an Object specified in the obj parameter to the desired TTarget.
(Defined by ObjectExtensions.)See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example. |
![]() | TryConvertTTarget(CultureInfo, TTarget) | Overloaded.
Tries to convert an Object specified in the obj parameter to the desired TTarget.
(Defined by ObjectExtensions.)See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example. |
See Also