--- id: monotonic version: "1.6" license: Apache license_treatment: permissive maintenance: abandoned --- # monotonic — An implementation of time.monotonic() for Python 2 & < 3.3 License: permissive · Maintenance: abandoned · Downloads: 14.0M/mo ## What it is and what it does monotonic is a thin compatibility shim that exposes a monotonic() function—a clock that measures elapsed time without ever going backwards, even if the system clock is adjusted. On Python 3.3 and later, it simply aliases the standard library's time.monotonic. On older Python versions, it implements platform-specific fallbacks using clock_gettime on Linux, BSD, AIX, GetTickCount on Windows, and mach_absolute_time on OS X. The package exists primarily to backport monotonic timing to Python 2 and early Python 3 codebases that need reliable elapsed-time measurement. It has no runtime dependencies and installs as a pure Python wheel. However, the repository has been archived since 2021 and receives no maintenance, making it relevant mainly for legacy systems that cannot upgrade to modern Python. Use it for: - Measure elapsed time in Python 2 codebases where time.monotonic is unavailable - Benchmark or profile code sections with a clock immune to system clock adjustments - Implement timeouts or rate-limiting logic unaffected by system time changes - Support legacy Python 2 applications during transition periods ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a monotonic clock function that returns elapsed time in fractional seconds without going backwards, with platform-specific fallbacks for Python versions before 3.3. No, unless you are maintaining legacy Python 2 code. The repository is archived and unmaintained since 2021. Install only if you are stuck supporting Python 2 or cannot upgrade to Python 3.3 or later, where time.monotonic is available in the standard library. ## Install pip install monotonic uv add monotonic poetry add monotonic ## Installing monotonic Before you install: Low install friction with no runtime dependencies. Repository is archived and unmaintained since 2021, but the package is marked Production/Stable and serves a narrow, stable purpose. License in practice: Licensed under Apache (permissive), so you can use it freely in commercial and open-source projects without viral obligations. Quickstart: pip install monotonic from monotonic import monotonic start = monotonic() # ... do work ... elapsed = monotonic() - start On unsupported platforms with no suitable clock implementation, importing the module will raise RuntimeError. Verify before relying: - Whether this package remains necessary given Python 2 end-of-life and time.monotonic in Python 3.3+ - Whether platform-specific implementations remain compatible with modern OS versions ## Package facts - License: Apache (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 14.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags monotonic clock timer, time.monotonic fallback, elapsed time measurement, monotonic timer python 2, clock that never goes backwards, platform-specific monotonic time, legacy-python-2, timing-compatibility [View on SkillFed](https://skillfed.io/packages/monotonic) · [View on PyPI](https://pypi.org/project/monotonic/)