BASS.NET API for the Un4seen BASS Audio LibraryHiPerfTimer ClassBASS.NET API for the Un4seen BASS Audio Library
Provides a Win32 high performance counter.
Inheritance Hierarchy

SystemObject
  Un4seen.Bass.MiscHiPerfTimer

Namespace: Un4seen.Bass.Misc
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
Syntax

public sealed class HiPerfTimer

The HiPerfTimer type exposes the following members.

Constructors

  NameDescription
Public methodHiPerfTimer
Default constructor to create a high performance counter.
Top
Properties

  NameDescription
Public propertyDuration
Returns the duration of the timer (in seconds).
Top
Methods

  NameDescription
Public methodStart
Start the timer.
Public methodStop
Stop the timer.
Top
Remarks

This class is very simple to use. Just create an instance of HiPerfTimer, call Start to start timing and call Stop to stop timing. To retrieve the elapsed time, just call the Duration method and you will get the elapsed time in seconds.
Examples

VB
' create a new HiPerfTimer object
Dim pt As New HiPerfTimer()
pt.Start() ' start the timer
Console.WriteLine("Test") ' the code to be timed
pt.Stop() ' stop the timer
' print the duration of the timed code
Console.WriteLine("Duration: {0} sec", pt.Duration)
// 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

Reference