Method | Description | |
---|---|---|
CalcTimeSpan ( System.DateTime startTime ) : System.TimeSpan |
Calculate the duration (to NowTicks) as a TimeSpan. System.TimeSpan This subtracts OverheadTicks from the measured ticks to compensate for overhead. |
|
CalcTimeSpan ( System.DateTime startTime, System.DateTime stopTime ) : System.TimeSpan |
Calculate the duration (to NowTicks) as a TimeSpan. System.TimeSpan This subtracts OverheadTicks from the measured ticks to compensate for overhead. |
|
CalcTimeSpan ( long startTicks ) : System.TimeSpan |
Calculate the duration (to NowTicks) as a TimeSpan. System.TimeSpan This subtracts OverheadTicks from the measured ticks to compensate for overhead. |
|
CalcTimeSpan ( long startTicks, long stopTicks ) : System.TimeSpan |
Calculate the duration as a TimeSpan. System.TimeSpan This subtracts OverheadTicks from the measured ticks to compensate for overhead. |
|
Calibrate ( ) : void |
Measure overhead for interop calls and clock resolution. The resultant values are stored in static fields. The resultant clock frequency and function call overhead measurement are used in ticks to ms conversion and duration calculations, respectively. This is called from the static constructor, so you typically won't benefit from calling it, unless during construction there were other very high priority things going on that affected the timing of the statements in this method. This temporarily boosts this process and thread priority to avoid being affected by other processes/threads, so you definitely don't want to call this a lot. |
|
TestSelf ( ) : bool |
A simple self test.
|
|
TicksToMs ( long ticks ) : float |
Convert ticks to milliseconds. (A tick is 100 nanoseconds.) No adjustment is made to this due to OverheadTicks. |
Method | Description | |
---|---|---|
HighResClock ( ) : System |
Not supposed to instantiate this class.
|
|
K32QueryPerformanceCounter ( long &t ) : uint | ||
K32QueryPerformanceFrequency ( long &t ) : uint |
public static CalcTimeSpan ( System.DateTime startTime ) : System.TimeSpan | ||
startTime | System.DateTime | The starting DateTime. |
return | System.TimeSpan |
public static CalcTimeSpan ( System.DateTime startTime, System.DateTime stopTime ) : System.TimeSpan | ||
startTime | System.DateTime | The starting DateTime. |
stopTime | System.DateTime | The stopping DateTime. |
return | System.TimeSpan |
public static CalcTimeSpan ( long startTicks ) : System.TimeSpan | ||
startTicks | long | The starting tick count. |
return | System.TimeSpan |
public static CalcTimeSpan ( long startTicks, long stopTicks ) : System.TimeSpan | ||
startTicks | long | The starting tick count. |
stopTicks | long | The stopTicks tick count. |
return | System.TimeSpan |
public static TicksToMs ( long ticks ) : float | ||
ticks | long | The tick count. |
return | float |