Metadata-Version: 2.1
Name: noifTimer
Version: 0.1.1
Summary: Timing class for measuring elapsed time and average elapsed time.
Project-URL: Homepage, https://github.com/matt-manes/noifTimer
Project-URL: Documentation, https://github.com/matt-manes/noifTimer/tree/main/docs
Project-URL: Source code, https://github.com/matt-manes/noifTimer/tree/main/src/noifTimer
Author: Matt Manes
License-File: LICENSE.txt
Keywords: timer,timing
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# noifTimer
Simple timer class to track average elapsed time with optional sub-second precision.<br>
Install with:
<pre>pip install noifTimer</pre>

Usage:
<pre>
from noifTimer import Timer
import time

def veryComplicatedFunction():
    time.sleep(1)

timer = Timer(subsecondFormat=True)
for _ in range(10):
    timer.start()
    veryComplicatedFunction()
    timer.stop()
print(f'{timer.averageElapsedTime=}')
print(timer.getStats())
</pre>
produces
<pre>
timer.averageElapsedTime=1.0005153999999998
elapsed time: 1s 871us
average elapsed time: 1s 515us
</pre>
