[2024-12-18] Update README and run.py to reflect new syntax

Also remove GitHub specific links and logo
This commit is contained in:
Andrew Conlin 2024-12-18 15:41:46 +00:00
parent 2a3087ad35
commit 5b2a23d06a
2 changed files with 73 additions and 31 deletions

25
run.py
View file

@ -1,11 +1,22 @@
import time
from tictoc import tic,toc
import tictoc
tic() # start timing
time.sleep(3) # sleep for 3 seconds
toc() # stop timing
# >>> The elapsed time was 3.000132333 seconds.
t = tictoc.init()
firstTic = tic()
time.sleep(3)
secondTic = tic()
time.sleep(1)
toc(firstTic)
# >>> The elapsed time was 4.000317251 seconds.
time.sleep(3)
toc(secondTic)
# >>> The elapsed time was 4.000312568 seconds.
t.tic() # start timing
time.sleep(3) # sleep for 3 seconds
t.toc() # stop timing
print(t.results.seconds)
tic()
results = toc()
print(results.nanos)
# >>> 2825