Struct StopwatchSlim
- Namespace
- LfrlAnvil.Diagnostics
- Assembly
- LfrlAnvil.Core.dll
A lightweight version of the Stopwatch class.
public readonly struct StopwatchSlim
- Inherited Members
- Extension Methods
Constructors
StopwatchSlim(long)
Creates a new StopwatchSlim instance.
public StopwatchSlim(long start)
Parameters
startlongStart of time measurement in stopwatch ticks.
Properties
ElapsedTime
Time elapsed between the Start of measurement and now.
public TimeSpan ElapsedTime { get; }
Property Value
Start
Start of time measurement in stopwatch ticks.
public long Start { get; }
Property Value
Methods
Create()
Creates a new StopwatchSlim instance with Start equal to GetTimestamp() invocation result.
[Pure]
public static StopwatchSlim Create()
Returns
- StopwatchSlim
New StopwatchSlim instance.