Tic Tec Toc timing for Python
Project description
tictectoc
Tic Tec Toc timing for Python.
How to install
pip install tictectoc
TicTecToc
- TicToc
import time
from tictectoc import TicTecToc
t = TicTecToc()
t.tic()
time.sleep(1)
t.toc() # print '[TTT:default] Elapsed time is 0:00:01'
t.tic()
time.sleep(2)
t.toc() # print '[TTT:default] Elapsed time is 0:00:02'
- TicTecToc
import time
from tictectoc import TicTecToc
t = TicTecToc()
for i in range(10):
t.tic()
time.sleep(1)
t.tec()
t.toc() # print '[TTT:default] Elapsed time is 0:00:10'
- TicTecToc with more than 1 timers
import time
from tictectoc import TicTecToc
t = TicTecToc()
for i in range(10):
t.tic('timer0')
t.tic('timer1')
time.sleep(1)
t.tec('timer0')
t.tec('timer1')
t.toc('timer0') # print '[TTT:timer0] Elapsed time is 0:00:10'
t.toc('timer1') # print '[TTT:timer1] Elapsed time is 0:00:10'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for tictectoc-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fbbaaf62ff25a129a26f987c4e82a5a347110b17e2a9199738614d41816b8b8 |
|
MD5 | f2b78b56085d0bd3b51deb4dc3f3b396 |
|
BLAKE2b-256 | b74f61a553425ce36ff359389aecadfc9d53abe88f05154a039c931872bde0d2 |