--- id: win-precise-time version: "1.4.2" license: MIT license_treatment: permissive maintenance: dormant --- # win-precise-time License: permissive · Maintenance: dormant · Downloads: 184.6K/mo ## What it is and what it does win-precise-time is a Windows-only C extension that provides microsecond-resolution time measurement and sub-millisecond sleep precision, addressing a Windows-specific limitation where the builtin time.time() offers only ~15ms resolution. The package exposes two main functions: time() retrieves the current timestamp using GetSystemTimePreciseAsFileTime, and sleep() implements a more precise sleep by using SetWaitableTimerEx without requiring system-wide timer resolution changes. Both functions are implemented in C and perform comparably to the builtin time.perf_counter(). The package has no runtime dependencies and supports Python 3.7 through current versions on both 32-bit and 64-bit Windows. The package is useful for Windows developers who need accurate timing for benchmarking, performance profiling, or real-time applications where millisecond-level jitter is unacceptable. It is production-stable but dormant; the last release was 2023-10-08 and the repository shows no active development, though it remains unarchived and free of known security vulnerabilities. Use it for: - Benchmarking and profiling Windows applications where builtin time.time() resolution is insufficient. - Real-time or latency-sensitive applications requiring sub-millisecond sleep precision without global timer changes. - Performance testing frameworks that need accurate microsecond-level timing on Windows. - Game engines or multimedia applications on Windows requiring precise frame timing. - Replacing time.time() and time.sleep() in code when running on Windows to avoid precision loss. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides high-resolution time measurement and sub-millisecond sleep on Windows by wrapping Windows API calls, replacing the ~15ms resolution of the builtin time.time(). Yes, if you are on Windows and need microsecond-resolution timing or sub-millisecond sleep precision. The package is stable, permissively licensed, and has no known vulnerabilities. However, expect no active maintenance or updates; dormant status means community support is limited. Not applicable on non-Windows platforms. ## Install pip install win-precise-time uv add win-precise-time poetry add win-precise-time ## Installing win-precise-time Before you install: Medium friction: platform-specific compiled wheels for Windows only (cp37–cp312, win32 and win_amd64). Dormant maintenance (last release 2023-10-08, last commit 2024-10-09); no active development but repository not archived. License in practice: MIT license (permissive); no restrictions on commercial or private use, modification, or distribution provided the license text is retained. Quickstart: pip install win-precise-time import win_precise_time as wpt wpt.time() # retrieve current time with high precision wpt.sleep(0.001) # sleep for 1ms with sub-millisecond precision Windows-only; requires Python 3.7 or later and a Windows OS (wheels provided for win32 and win_amd64 only). Verify before relying: - Whether the package works reliably on all supported Python versions given dormant maintenance status. - Real-world precision guarantees under different system loads or timer configurations. - Compatibility with Windows Server editions or non-standard Windows configurations. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: dormant - Downloads: 184.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags windows high resolution timer, precise sleep windows, sub-millisecond sleep, windows time accuracy, getsystemtimepreciseasfiletime, queryperformancecounter wrapper, windows timer precision, windows-only, timing-precision, c-extension [View on SkillFed](https://skillfed.io/packages/win-precise-time) · [View on PyPI](https://pypi.org/project/win-precise-time/)