koaning / memo

Decorators that logs stats.
https://koaning.github.io/memo/getting-started.html
MIT License
103 stars 9 forks source link

use time.perf_counter instead of time.time #42

Closed sizhky closed 11 months ago

sizhky commented 11 months ago

time. perf_counter() uses the processor's performance counter to measure time while time. time() uses the system clock.

In general, perf_counter() is more precise and has a higher resolution than time() , so it's often the better choice for timing small code blocks or individual statements, and this is recommended by python's builtin time module

koaning commented 11 months ago

That's a fair add. Will add a reminder to make a new release.