Struct Stopwatch
- Namespace
- Luny
- Assembly
- Luny.dll
A lightweight readonly struct that records a point in time to measure duration.
public readonly struct Stopwatch
Methods
ElapsedHours(double)
Returns the elapsed time in hours since the timestamp was started.
public double ElapsedHours(double now)
Parameters
nowdouble
Returns
- double
ElapsedMilliseconds(double)
Returns the elapsed time in milliseconds since the timestamp was started.
public double ElapsedMilliseconds(double now)
Parameters
nowdouble
Returns
- double
ElapsedMinutes(double)
Returns the elapsed time in minutes since the timestamp was started.
public double ElapsedMinutes(double now)
Parameters
nowdouble
Returns
- double
ElapsedSeconds(double)
Returns the elapsed time in seconds since the timestamp was started.
public double ElapsedSeconds(double now)
Parameters
nowdouble
Returns
- double
Start(double)
Starts measuring time from the provided start time.
public static Stopwatch Start(double now)
Parameters
nowdouble
Returns
ToString()
public override string ToString()
Returns
- string