freebsd-ports/devel/py-ttictoc/pkg-descr
Dan Langille c440f3b05b Add py-ttictoc
Tools for timing python code.

PR:		247354
Submitted by:	Gilbert Morgan <gmm@tutanota.com>
2020-06-29 19:11:36 +00:00

14 lines
308 B
Text

Time execution of blocks of code.
Tested against python 3.6+, but should work with other versions.
The easiest way to time something is with tic and toc:
import time
from ttictoc import tic,toc
tic()
time.sleep(1)
elapsed = toc()
print('Elapsed time:',elapsed)
WWW: https://github.com/hector-sab/ttictoc