Skip to main content

Monoclock

Monoclock is a fast Python module that provides access to the monotonic clock on Linux and OS X.

Compatibility: tested on CPython 2.6.5, CPython 2.7, pypy 1.3, and pypy 1.4.

Usage

` import monoclock t = monoclock.nano_count() print t `

If you want seconds, divide t by 1e9.

Installation

Make sure you have a C compiler and Python headers installed. On Ubuntu, that can be done with

` sudo apt-get install python-dev build-essential `

Then, install Monoclock from PyPi:

` pip install --user Monoclock `

or from the git repo:

` git clone https://github.com/ludios/Monoclock cd Monoclock pip install --user . `

or without pip:

` python setup.py install --user `

You should now have the monoclock module installed.

Optionally, run the tests with python run_tests.py

Misc

If you’re having trouble with monotonic clocks, see:

Wishlist

  • Windows support.

  • Solaris support (does it work?).

  • Expose CLOCK_MONOTONIC_RAW (which is not adjusted by NTP).

  • Support buggy AMD chips, or expose a probablyBuggy() function that returns True if the monotonic clock is unreliable.

    Note: Chromium’s base/time_win.cc just disables use of the monotonic clock on Athlon X2 CPUs with if (cpu.vendor_name() == “AuthenticAMD” && cpu.family() == 15

Contributing

Patches and pull requests are welcome.

This coding standard applies: http://ludios.org/coding-standard/

Metadata

Release files for Monoclock 14.4.18

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distributions (sdists)

Source distribution for Monoclock 14.4.18
File Size Uploaded Provenance Actions
Monoclock-14.4.18.zip 4.6 kB Without provenance Details for Monoclock-14.4.18.zip
Monoclock-14.4.18.tar.gz 3.6 kB Without provenance Details for Monoclock-14.4.18.tar.gz

Release files / Monoclock-14.4.18.zip

Download URL Monoclock-14.4.18.zip
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
acbef6ac502586f93987291655ced2eaa599f54df9f4d5501b71eca3e21d25d8
BLAKE2b-256 checksum
How to use checksums
7d857f1084109afd3a4272339b10bd53396654e8babd1870ca122ff6176c49cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / Monoclock-14.4.18.tar.gz

Download URL Monoclock-14.4.18.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b726ef8c0998238c0624fb08bdaa3e3c5fe858f61d87f4b72d0fc5676ef6ac08
BLAKE2b-256 checksum
How to use checksums
068e144b165b07438a142917d09985ce3c44465eb69cd76297a6ad951267c9d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for Monoclock 14.4.18

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page