Yuari
Documentation
Docs/Timer/Stopwatch:Reset

Stopwatch:Reset

Stops the stopwatch and clears its elapsed time.

Syntax

Stopwatch:Reset() -> nil

Parameters

This function takes no parameters.

Returns

TypeDescription
nilThis function does not return a value.

Description

Stopwatch:Reset 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:Reset()

Notes

  • Timer callbacks run on the executor scheduler; disable or destroy timers when they are finished.