pause
Builtin index · REPL & diagnostics
pause(t)
Input: t · Output: no output
What it is
Takes one argument, t (a timer object). Freezes the count, keeping the accumulated total so start resumes from where it left off.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
pause(t) | t —not documented yet | no output | Freezes the count, keeping the accumulated total so start resumes from where it left off. |
Examples
From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.
t = timer()
start(t)
lap1 = restart(t)
lap2 = restart(t)
pause(t)
print("lap1={lap1}, lap2={lap2}")
from repl-diagnostics
How it works
pause(t) — freeze the count, keeping the accumulated total (start resumes from where it left off). Idempotent on an already-paused timer.
From the note above this builtin in the interpreter, where the reasoning was written down as it was built.