A version of Stopwatch that uses Win32 performance counter.
For regular use, use the
Stopwatch class. Since .NET dose not have
a close equivalence of the Java ThreadMXBean class, we will not port the
StopwatchCPU
class. Instead, we use this class as a demonstration of an alternative Stopwatch implementation.
Inheritance Hierarchy
Namespace: Algs4NetAssembly: Algs4Net (in Algs4Net.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic class StopwatchWin32
The StopwatchWin32 type exposes the following members.
Constructors
Methods
| Name | Description |
---|
 | ElapsedTime |
Returns the elapsed CPU time (in seconds) since the stopwatch was created. |
  | MainTest |
Demo test for the data type.
|
Top
RemarksFor additional documentation,
see
Section 1.4 of
Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.
See Also