{ "info": { "author": "Marc Brinkmann", "author_email": "git@marcbrinkmann.de", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "ticking\n=======\n\nUseful tools when dealing with clocks for timing and benchmarking. Will use a\ndifferent method for retrieving accurate, monotonic clock values (see source\nfor detail).\n\nTested on Python 2.7 and 3.3+. The latter is recommended because the ``time``\nmodule contains much better access to OS timing functions.\n\nExamples\n--------\n\nSimple framerate-limiter:\n\n.. code-block:: pycon\n\n >>> import ticking\n >>> for frame, t in ticking.Clock(0.5):\n ... print(frame, t)\n ...\n 1 0.5\n 2 1.0\n 3 1.5\n ...\n\n\nAfter dropping a frame, the clock is aligned again:\n\n.. code-block:: pycon\n\n >>> import time\n >>> for frame, t in ticking.Clock(0.5):\n ... print(frame, t)\n ... time.sleep(0.8) # drop a frame\n ...\n 1 0.5\n 3 1.5\n 5 2.5\n\nMeasuring time:\n\n.. code-block:: pycon\n\n >>> with ticking.Stopwatch('Demonstration') as sw:\n ... time.sleep(1.3)\n ...\n >>> sw.total\n 1.3013252970049507\n >>> print(sw)\n Demonstration: took 1.30s\n\nQuick in-program profiling:\n\n.. code-block:: pycon\n\n >>> with ticking.profiled('testprofile.prof'):\n ... time.sleep(1.0)\n ...\n >>> import pstats\n >>> pstats.Stats('testprofile.prof').print_stats()\n Wed Jun 8 11:21:38 2016 testprofile.prof\n\n 5 function calls in 1.001 seconds\n\n Random listing order was used\n\n ncalls tottime percall cumtime percall filename:lineno(function)\n 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects}\n 1 1.001 1.001 1.001 1.001 {built-in method sleep}\n 1 0.000 0.000 0.000 0.000 /usr/lib/python3.4/contextlib.py:63(__exit__)\n 1 0.000 0.000 0.000 0.000 {built-in method next}\n 1 0.000 0.000 0.000 0.000 /home/marc/Documents/github.com/mbr/ticking/ticking.py:137(profiled)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mbr/ticking", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "ticking", "package_url": "https://pypi.org/project/ticking/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ticking/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/mbr/ticking" }, "release_url": "https://pypi.org/project/ticking/0.4.0/", "requires_dist": null, "requires_python": null, "summary": "A small timing utility library, handling framerates and rough benchmarks.", "version": "0.4.0" }, "last_serial": 2156450, "releases": { "0.3.0": [ { "comment_text": "", "digests": { "md5": "ad01926a13337c51378f022caf37cca1", "sha256": "5095ac5ce94414b87efdb946484697c77e5f650e5405b0085772ecf38bbfb9a6" }, "downloads": -1, "filename": "ticking-0.3.0.tar.gz", "has_sig": true, "md5_digest": "ad01926a13337c51378f022caf37cca1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3200, "upload_time": "2016-02-03T02:07:12", "url": "https://files.pythonhosted.org/packages/0b/bc/1181dade34a246a2d18b7657c64434f1ac6960d540327cbd9e323de18588/ticking-0.3.0.tar.gz" } ], "0.3.1.dev1": [], "0.4.0": [ { "comment_text": "", "digests": { "md5": "942f75451bceecf3ea1e0b8bbc8b6b8e", "sha256": "c5c1a72a41e2afc23225dfad6aaba8eacc3d1269cc6d40a676fb7192022eac1a" }, "downloads": -1, "filename": "ticking-0.4.0.tar.gz", "has_sig": true, "md5_digest": "942f75451bceecf3ea1e0b8bbc8b6b8e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3954, "upload_time": "2016-06-08T09:27:59", "url": "https://files.pythonhosted.org/packages/7d/cb/bba999ddc712c36f3cdba035a076d32da2e935afd709bee35228c5bd5550/ticking-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "942f75451bceecf3ea1e0b8bbc8b6b8e", "sha256": "c5c1a72a41e2afc23225dfad6aaba8eacc3d1269cc6d40a676fb7192022eac1a" }, "downloads": -1, "filename": "ticking-0.4.0.tar.gz", "has_sig": true, "md5_digest": "942f75451bceecf3ea1e0b8bbc8b6b8e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3954, "upload_time": "2016-06-08T09:27:59", "url": "https://files.pythonhosted.org/packages/7d/cb/bba999ddc712c36f3cdba035a076d32da2e935afd709bee35228c5bd5550/ticking-0.4.0.tar.gz" } ] }