Simple Stop Watch
class SimpleStopWatch
Minimalistic stopwatch to measure the elapsed time between operations.
This stopwatch does not
support multi-threading. When implementing this stopwatch, make sure to take care of this properly, otherwise inconsistency and unexpected errors will be a problem for you. This stopwatch uses Clock.System.now to retrieve both the start-time and stop-time. A regular run expects you to call start, followed by stop, and then either of getTime or toString to retrieve the elapsed time as a formatted string.
Author
Griefed
Properties
Functions
Link copied to clipboard
Get the elapsed time in nanoseconds. Depending on the state of the stopwatch, two values or an IllegalStateException may be thrown.
Link copied to clipboard
Starts the stopwatch.
Link copied to clipboard
Stops the stopwatch.