Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/dabeaz/python-cookbook
/ stopwatch.py
File
stopwatch.py
src/13/making_a_stopwatch/stopwatch.py:None–None ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
import
time
2
3
class
Timer:
4
def
__init__(self, func=time.perf_counter):
Callers
nothing calls this directly
Calls
4
Timer
Class · 0.85
end
Method · 0.80
countdown
Function · 0.70
start
Method · 0.45
Tested by
no test coverage detected