Stopwatch:Stop
Stops the stopwatch and adds the elapsed time.
Syntax
Stopwatch:Stop() -> nil
Parameters
This function takes no parameters.
Returns
| Type | Description |
|---|---|
nil | This function does not return a value. |
Description
Stopwatch:Stop is part of the Timer library. Timer, Stopwatch and Duration objects driven by the VM scheduler.
The operation is performed immediately using the arguments supplied at the call site.
Example
local stopwatch = Stopwatch.new()
stopwatch:Start()
stopwatch:Stop()
Notes
- Timer callbacks run on the executor scheduler; disable or destroy timers when they are finished.