Skip to main content

An implementation of time.monotonic() for Python 2 & < 3.3

Project description

This module provides a monotonic() function which returns the value (in fractional seconds) of a clock which never goes backwards.

On Python 3.3 or newer, monotonic will be an alias of time.monotonic from the standard library. On older versions, it will fall back to an equivalent implementation:

Linux, BSD, AIX

clock_gettime(3)

Windows

GetTickCount or GetTickCount64

OS X

mach_absolute_time

If no suitable implementation exists for the current platform, attempting to import this module (or to import from it) will cause a RuntimeError exception to be raised.

Project details


Download files

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

Source Distribution

monotonic-1.6.tar.gz (7.6 kB view hashes)

Uploaded source

Built Distribution

monotonic-1.6-py2.py3-none-any.whl (8.2 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page