noifTimer


NamenoifTimer JSON
Version 0.1.1 PyPI version JSON
download
home_page
SummaryTiming class for measuring elapsed time and average elapsed time.
upload_time2023-01-18 23:02:42
maintainer
docs_urlNone
authorMatt Manes
requires_python>=3.10
license
keywords timer timing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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>

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "noifTimer",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "timer,timing",
    "author": "Matt Manes",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/60/fa/dfa9138abf0b6022739e4369c12ec0cc7cada267dee70791b4e69e2aba07/noiftimer-0.1.1.tar.gz",
    "platform": null,
    "description": "# noifTimer\nSimple timer class to track average elapsed time with optional sub-second precision.<br>\nInstall with:\n<pre>pip install noifTimer</pre>\n\nUsage:\n<pre>\nfrom noifTimer import Timer\nimport time\n\ndef veryComplicatedFunction():\n    time.sleep(1)\n\ntimer = Timer(subsecondFormat=True)\nfor _ in range(10):\n    timer.start()\n    veryComplicatedFunction()\n    timer.stop()\nprint(f'{timer.averageElapsedTime=}')\nprint(timer.getStats())\n</pre>\nproduces\n<pre>\ntimer.averageElapsedTime=1.0005153999999998\nelapsed time: 1s 871us\naverage elapsed time: 1s 515us\n</pre>\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Timing class for measuring elapsed time and average elapsed time.",
    "version": "0.1.1",
    "split_keywords": [
        "timer",
        "timing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4c326fbc8978135393bb5ef10e02acaeae3854b572047947ff2edeb6812a3a66",
                "md5": "e1fda1d240bbbcafbf75ddc2d0c45e08",
                "sha256": "65e4576ea6097029d534b8564fee4bfd1f50f17d39069576b4a403c1f41fd1c0"
            },
            "downloads": -1,
            "filename": "noiftimer-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e1fda1d240bbbcafbf75ddc2d0c45e08",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 3736,
            "upload_time": "2023-01-18T23:02:41",
            "upload_time_iso_8601": "2023-01-18T23:02:41.231773Z",
            "url": "https://files.pythonhosted.org/packages/4c/32/6fbc8978135393bb5ef10e02acaeae3854b572047947ff2edeb6812a3a66/noiftimer-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "60fadfa9138abf0b6022739e4369c12ec0cc7cada267dee70791b4e69e2aba07",
                "md5": "3895ee3d8223ba1de4272630789e891c",
                "sha256": "2995fe9e66cebbd3d9fcf7a947e9483f21fae4f92d846ab87c14cd8a7742867c"
            },
            "downloads": -1,
            "filename": "noiftimer-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "3895ee3d8223ba1de4272630789e891c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 6497,
            "upload_time": "2023-01-18T23:02:42",
            "upload_time_iso_8601": "2023-01-18T23:02:42.820318Z",
            "url": "https://files.pythonhosted.org/packages/60/fa/dfa9138abf0b6022739e4369c12ec0cc7cada267dee70791b4e69e2aba07/noiftimer-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-18 23:02:42",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "noiftimer"
}
        
Elapsed time: 0.20306s