[2024-12-18] Update README and run.py to reflect new syntax
Also remove GitHub specific links and logo
This commit is contained in:
parent
2a3087ad35
commit
5b2a23d06a
2 changed files with 73 additions and 31 deletions
25
run.py
25
run.py
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue