This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

implementation of PEP0418 with the "Choosing the clock from a list of constraints" get_clock() and get_clocks() functions

Project Description

PEP 418 (https://www.python.org/dev/peps/pep-0418/) generated much discussion.

Most particpants wanted a call to get a high resolution monotonic clock, which many platforms offer, and much of the discussion surrounded what guarrentees Python should offer for the clock it returned.

I was of the opinion that:

  • the many different clocks available have varying features and that the user should be able to inspect them when handed a clock
  • the proposed time.monotonic() et al should be offered as default policies for convenience
  • however, the proposed time.monotonic() call and friends represented policy; the user calling it is handed an arbitrary clock with some guarrentees; the user has no facility to implement policy themselves. Therefore I proposed two calls: get_clock() and get_clocks() for requesting or enumerating clocks with desired features from those available on the platform.

This cs.clockutils package implements get_clock() and get_clocks() and provides example implementations of the “policy” calls such as monotonic().

Release History

Release History

This version
History Node

20150116.2

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
cs.clockutils-20150116.2.tar.gz (5.3 kB) Copy SHA256 Checksum SHA256 Source Jan 18, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting