Skip to content

PyTimer 0.4

Choose a tag to compare

@BlendingJake BlendingJake released this 21 Jan 01:54
· 87 commits to master since this release

Some new features:

  • Introduced more time units: microseconds (us), and nanoseconds (ns)
  • Switched from time.time() to time.perf_counter() which is more accurate and allows accuracy into nanosecond range
  • Can force units to all be the same in displayed data: PyTimer(units=(PyTimer.seconds, PyTimer.milliseconds, PyTimer.microseconds, PyTimer.nanoseconds))
  • standardized outputs between display methods
  • added keyword argument support for functions using decorators, as well as evaluate() with a function
  • added support for automatic message generation for splits generated by evaluate() and a function using the decorator
  • evaluate() with a function is now more efficient by directly calling the function instead of using exec()

I also am working on the Wiki to be clearer and easier to find examples.