Metadata-Version: 2.1
Name: noiftimer
Version: 1.0.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 very_complicated_function():
    time.sleep(1)

timer = Timer()
for _ in range(10):
    timer.start()
    very_complicated_function()
    timer.stop()
print(f'{timer.average_elapsed_time=}')
print(timer.get_stats(subsecond_resolution=True))
</pre>
produces
<pre>
timer.average_elapsed_time=1.0006019
elapsed time: 1s 836us
average elapsed time: 1s 601us
</pre>
