Skip to content

Python Timing

sjherrick edited this page Nov 7, 2019 · 2 revisions

Timing

Simple Function Timer

from timeit import default_timer as timer

start = timer()
# ...
end = timer()
print(end - start) # Time in seconds, e.g. 5.38091952400282
Clone this wiki locally