Provides a Win32 high performance counter.
Inheritance Hierarchy
Un4seen.Bass.MiscHiPerfTimer
Namespace: Un4seen.Bass.Misc
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
The HiPerfTimer type exposes the following members.
Constructors
Name | Description | |
---|---|---|
HiPerfTimer |
Default constructor to create a high performance counter.
|
Properties
Name | Description | |
---|---|---|
Duration |
Returns the duration of the timer (in seconds).
|
Methods
Name | Description | |
---|---|---|
Start |
Start the timer.
| |
Stop |
Stop the timer.
|
Remarks
Examples
// create a new HiPerfTimer object HiPerfTimer pt = new HiPerfTimer(); pt.Start(); // start the timer // the code to be timed Console.WriteLine("Test"); pt.Stop(); // stop the timer // print the duration of the timed code Console.WriteLine("Duration: {0} sec", pt.Duration);
See Also