Stopwatch
A stopwatch that accumulates elapsed time across start and stop cycles.
Time is read from timeSource, which defaults to TimeSource.Monotonic. The stopwatch starts out stopped with a zero elapsed value. Stopping keeps the accumulated time; use reset or restart to clear it.
This class is not thread-safe. Confine each instance to a single thread or coroutine, or guard it with external synchronization.
Properties
Functions
Link copied to clipboard
Stops the stopwatch and clears elapsed to Duration.ZERO.
Link copied to clipboard
Clears elapsed to Duration.ZERO and starts the stopwatch in one call.