{ "info": { "author": "Cameron Simpson", "author_email": "cs@cskk.id.au", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "A framework to present system clocks by feature, intended to avoid\nthe library-as-policy pitfalls of the discussion around PEP 418.\n\nMy 2c:\n* http://www.gossamer-threads.com/lists/python/dev/977474#977474\n* http://www.gossamer-threads.com/lists/python/dev/977495#977495\nor:\n* http://www.mail-archive.com/python-dev@python.org/msg66174.html\n* http://www.mail-archive.com/python-dev@python.org/msg66179.html\n\n- Cameron Simpson 02apr2012\n\n## Class `BaseClock`\n\nA BaseClock is the private base class of clock objects.\n\nA clock has the following mandatory attributes:\n* `.flags`: Feature flags describing the clock.\n\nA clock may have the following optional attributes:\n* `.epoch`:\n If present, the offset from time.time()'s epoch of this\n clock's epoch(). Not all clocks have epochs; some measure\n elapsed time from an unknown point and only the difference\n in two measurements is useful.\n* `.resolution`:\n The resolution of the underlying clock facility's\n reporting units. The clock can never be more precise than\n this value. The actual accuracy of the reported time may\n vary with adjustments and the real accuracy of the\n underlying OS clock facility (which in turn may be\n dependent on the precision of some hardware clock).\n\nA clock must also supply the following methods:\n* `.now()`: Report the current time in seconds, a float.\n\n## Class `ClockEntry`\n\nMRO: `builtins.tuple` \nClockEntry(flags, factory)\n\n## Class `ClockFlags`\n\nMRO: `builtins.int` \nAn int with human friendly str() and repr() for clock flags.\n\nThe flag names are:\n* `HIGHRES`: clock with the highest resolution.\n* `MONOTONIC`: clock does not go backwards.\n* `STEADY`: clock with high *stability*\n and relatively high *accuracy* and *precision*.\n* `ADJUSTED`: clock whose value may be changed\n to the correct time.\n* `WALLCLOCK`: what the clock on the wall shows.\n* `RUNTIME`: clock based on the process running time.\n* `SYNTHETIC`: clock computed from other clocks,\n such as a monotonic clock computed from other\n nonmonotonic clocks.\n\n## Function `get_clock(flags=0, clocklist=None)`\n\nReturn a clock based on the supplied `flags`.\nThe returned clock shall have all the requested flags.\nIf no clock matches, return None.\n\n## Function `get_clocks(flags=0, clocklist=None)`\n\nYield all clocks matching the supplied `flags`.\nThe returned clocks shall have all the requested flags.\n\n## Function `highres()`\n\nReturn the current time according to the default high resolution clock.\n\n## Function `highres_clock(other_flags=0)`\n\nReturn a high resolution clock, preferably steady.\n\n## Function `monotonic()`\n\nReturn the current time according to the default monotonic clock.\n\n## Function `monotonic_clock(other_flags=0)`\n\nReturn a monotonic clock, preferably high resolution.\n\n## Function `steady()`\n\nReturn the current time according to the default steady clock.\n\n## Function `steady_clock(other_flags=0)`\n\nReturn a steady clock, preferably high resolution.\n\n## Class `SyntheticMonotonic`\n\nMRO: `BaseClock` \nAn example synthetic clock.\n\nThis class comes after time.time() because I think synthetic\nclocks should be less desired - they tend to have side\neffects; but perhaps offered anyway because they can offer\nflag combinations not always presented by the system clocks.\n\nA simple synthetic monotonic clock may skew with respect to other\ninstances.\nSteven D'Aprano wrote a better one.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/cameron_simpson/css/commits/all", "keywords": "python2,python3", "license": "", "maintainer": "", "maintainer_email": "", "name": "cs.clockutils", "package_url": "https://pypi.org/project/cs.clockutils/", "platform": "", "project_url": "https://pypi.org/project/cs.clockutils/", "project_urls": { "Homepage": "https://bitbucket.org/cameron_simpson/css/commits/all" }, "release_url": "https://pypi.org/project/cs.clockutils/20190101/", "requires_dist": null, "requires_python": "", "summary": "implementation of PEP0418 with the \"Choosing the clock from a list of constraints\" get_clock() and get_clocks() functions", "version": "20190101" }, "last_serial": 4649359, "releases": { "20150116.2": [ { "comment_text": "", "digests": { "md5": "354b8294b90560e1b2cf27bae9df5816", "sha256": "1de260ab0274eef886d22d51832e000547aa6a412735608f1fb7f78c7f318371" }, "downloads": -1, "filename": "cs.clockutils-20150116.2.tar.gz", "has_sig": false, "md5_digest": "354b8294b90560e1b2cf27bae9df5816", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5295, "upload_time": "2015-01-18T06:10:06", "url": "https://files.pythonhosted.org/packages/51/be/8cc15c263d69b13722572c48dc198de10b06cf6bc4a0ea727ab57bd754c1/cs.clockutils-20150116.2.tar.gz" } ], "20190101": [ { "comment_text": "", "digests": { "md5": "a2f0f486a82ff8764c7fd6b57a9fb889", "sha256": "df414bb2fad45446b28981cac5033b5c294539b4925246e87c603eca5c6f0393" }, "downloads": -1, "filename": "cs.clockutils-20190101.tar.gz", "has_sig": false, "md5_digest": "a2f0f486a82ff8764c7fd6b57a9fb889", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6021, "upload_time": "2019-01-01T02:21:09", "url": "https://files.pythonhosted.org/packages/38/d6/191f87f18cc22c88e7c2fa1bd2b48428d6ad5e6b9ae6d68411f698ae829c/cs.clockutils-20190101.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a2f0f486a82ff8764c7fd6b57a9fb889", "sha256": "df414bb2fad45446b28981cac5033b5c294539b4925246e87c603eca5c6f0393" }, "downloads": -1, "filename": "cs.clockutils-20190101.tar.gz", "has_sig": false, "md5_digest": "a2f0f486a82ff8764c7fd6b57a9fb889", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6021, "upload_time": "2019-01-01T02:21:09", "url": "https://files.pythonhosted.org/packages/38/d6/191f87f18cc22c88e7c2fa1bd2b48428d6ad5e6b9ae6d68411f698ae829c/cs.clockutils-20190101.tar.gz" } ] }