Summary
A lightweight, high-resolution timer for performance measurement.
More efficient than
T:System.Diagnostics.Stopwatch with a simpler API.
Examples
var timer = FastTimer.StartNew();
// Do work...
Log.Info( $"Took {timer.ElapsedMilliSeconds}ms" );
Properties
| Elapsed |
Gets the time elapsed since the timer was started as a TimeSpan. |
| ElapsedMicroSeconds |
Gets the number of microseconds elapsed since the timer was started. |
| ElapsedMilliSeconds |
Gets the number of milliseconds elapsed since the timer was started. |
| ElapsedSeconds |
Gets the number of seconds elapsed since the timer was started. |
| ElapsedTicks |
Gets the number of ticks elapsed since the timer was started. |
| StartTick |
Gets the timestamp when the timer was started. |
Methods
| Start |
Starts or restarts the timer. |
Static Methods
| StartNew |
Creates and starts a new FastTimer. |