C# Class NewTOAPIA.Kernel.PrecisionTimer

The PrecisionTimer wraps the Kernel32 calls to QueryPerformanceFrequency and QueryPerformanceCounter. By doing so, this class provides easy access to this high precision timing mechanism if it is available in the system. A class such as System.StopWatch can be built using this Precision timer class as well as other timing mechanisms when precision timing is not available. When you know your application is running on a system that supports precision timing, you can simply use this class.
Mostrar archivo Open project: Wiladams/NewTOAPIA Class Usage Examples

Public Methods

Method Description
GetElapsedSeconds ( ) : double

Return the number of seconds that elapsed since Reset() was called.

PrecisionTimer ( ) : System
Reset ( ) : void

Reset the startCount, which is the current tick count. This will reset the elapsed time because elapsed time is the difference between the current tick count, and the one that was set here in the Reset() call.

Method Details

GetElapsedSeconds() public method

Return the number of seconds that elapsed since Reset() was called.
public GetElapsedSeconds ( ) : double
return double

PrecisionTimer() public method

public PrecisionTimer ( ) : System
return System

Reset() public method

Reset the startCount, which is the current tick count. This will reset the elapsed time because elapsed time is the difference between the current tick count, and the one that was set here in the Reset() call.
public Reset ( ) : void
return void