Skip to main content

Tic Tec Toc timing for Python

Project description

tictectoc

Tic Tec Toc timing for Python.

How to install

pip install tictectoc

TicTecToc

  1. 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'
  1. 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'
  1. 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


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

tictectoc-0.1.4-py3-none-any.whl (3.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page