Skip to main content

win-precise-time

PyPI - Version PyPI - Python Version Documentation Status

The documentation is available here.


Table of Contents

Description

On Windows the builtin time.time() provides a timestamp with ~15ms resolution. This package provides the function win_precise_time.time() to retrieve an accurate timestamp by using GetSystemTimePreciseAsFileTime. The function is implemented as a C extension so the performance is equal to the builtin time.perf_counter() (both functions rely on QueryPerformanceCounter).

The function win_precise_time.sleep() reimplements the more precise time.sleep() version of CPython >= 3.11 for older python versions. This enables sub-millisecond sleep precision without increasing the Windows timer resolution via timeBeginPeriod.

Installation

pip install win-precise-time

Usage

>>> import win_precise_time as wpt
>>> wpt.time()  # retrieve current time
1654539449.4548845
>>> wpt.sleep(0.001)  # sleep for 1ms

Test

pip install tox
tox

Build

pip install build
python -m build .

License

win-precise-time is distributed under the terms of the MIT license.

Metadata

Release files for win-precise-time 1.4.2

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

Source distribution (sdist)

Source distribution for win-precise-time 1.4.2
File Size Uploaded
win-precise-time-1.4.2.tar.gz 8.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for win-precise-time 1.4.2
File
win_precise_time-1.4.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
win_precise_time-1.4.2-cp312-cp312-win32.whl CPython 3.12 CPython 3.12 Windows x86-32 Details
win_precise_time-1.4.2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
win_precise_time-1.4.2-cp311-cp311-win32.whl CPython 3.11 CPython 3.11 Windows x86-32 Details
win_precise_time-1.4.2-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
win_precise_time-1.4.2-cp310-cp310-win32.whl CPython 3.10 CPython 3.10 Windows x86-32 Details
win_precise_time-1.4.2-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
win_precise_time-1.4.2-cp39-cp39-win32.whl CPython 3.9 CPython 3.9 Windows x86-32 Details
win_precise_time-1.4.2-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
win_precise_time-1.4.2-cp38-cp38-win32.whl CPython 3.8 CPython 3.8 Windows x86-32 Details
win_precise_time-1.4.2-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details
win_precise_time-1.4.2-cp37-cp37m-win32.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-32 Details

Total release size: 185.8 kB

Release files / win-precise-time-1.4.2.tar.gz

Download URL win-precise-time-1.4.2.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
89274785cbc5f2997e01675206da3203835a442c60fd97798415c6b3c179c0b9
BLAKE2b-256 checksum
How to use checksums
9eb021547e16a47206ccdd15769bf65e143ade1ffae67f0881c855f76e44e9fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / win_precise_time-1.4.2-cp312-cp312-win_amd64.whl

Download URL win_precise_time-1.4.2-cp312-cp312-win_amd64.whl
Size 14.9 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
85670f77cc8accd8f1e6d05073999f77561c23012a9ee988cbd44bb7ce655062
BLAKE2b-256 checksum
How to use checksums
17197ea9a22a69fc23d5ca02e8edf65e4a335a210497794af1af0ef8fda91fa0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / win_precise_time-1.4.2-cp312-cp312-win32.whl

Download URL win_precise_time-1.4.2-cp312-cp312-win32.whl
Size 14.7 kB
Tags CPython 3.12 Windows x86-32
SHA-256 checksum
How to use checksums
0210dcea88a520c91de1708ae4c881e3c0ddc956daa08b9eabf2b7c35f3109f5
BLAKE2b-256 checksum
How to use checksums
2e9655a14b5c0e90439951f4a72672223bba81a5f882033c5850f8a6c7f4308b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / win_precise_time-1.4.2-cp311-cp311-win_amd64.whl

Download URL win_precise_time-1.4.2-cp311-cp311-win_amd64.whl
Size 14.9 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
0897bb055f19f3b4336e2ba6bee0115ac20fd7ec615a6d736632e2df77f8851a
BLAKE2b-256 checksum
How to use checksums
f99c46d69220d468c82ca2044284c5a8089705c5eb66be416abcbba156365a14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / win_precise_time-1.4.2-cp311-cp311-win32.whl

Download URL win_precise_time-1.4.2-cp311-cp311-win32.whl
Size 14.7 kB
Tags CPython 3.11 Windows x86-32
SHA-256 checksum
How to use checksums
59272655ad6f36910d0b585969402386fa627fca3be24acc9a21be1d550e5db8
BLAKE2b-256 checksum
How to use checksums
bbd6a48717649fea2d7a6679db86dae9ae4b12078c7a48aa89a8f14a360f29d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / win_precise_time-1.4.2-cp310-cp310-win_amd64.whl

Download URL win_precise_time-1.4.2-cp310-cp310-win_amd64.whl
Size 14.9 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
bb8e44b0fc35fde268e8a781cdcd9f47d47abcd8089465d2d1d1063976411c8e
BLAKE2b-256 checksum
How to use checksums
257f5087d16a720b6833cb631b4b6f912b0ff433377227ecbbc494453951cbb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / win_precise_time-1.4.2-cp310-cp310-win32.whl

Download URL win_precise_time-1.4.2-cp310-cp310-win32.whl
Size 14.7 kB
Tags CPython 3.10 Windows x86-32
SHA-256 checksum
How to use checksums
7fa13a2247c2ef41cd5e9b930f40716eacc7fc1f079ea72853bd5613fe087a1a
BLAKE2b-256 checksum
How to use checksums
f78bba6bdef9284fd75f816205bf9a198a2cf7b22459ff401174143ade5afe08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / win_precise_time-1.4.2-cp39-cp39-win_amd64.whl

Download URL win_precise_time-1.4.2-cp39-cp39-win_amd64.whl
Size 14.9 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
3f510fa92d9c39ea533c983e1d62c7bc66fdf0a3e3c3bdda48d4ebb634ff7034
BLAKE2b-256 checksum
How to use checksums
17cf4237d55123e107f32ba1417d00f7b0ea0e894bb68e495678db52bdccab5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / win_precise_time-1.4.2-cp39-cp39-win32.whl

Download URL win_precise_time-1.4.2-cp39-cp39-win32.whl
Size 14.7 kB
Tags CPython 3.9 Windows x86-32
SHA-256 checksum
How to use checksums
50d11a6ff92e1be96a8d4bee99ff6dc07a0ea0e2a392b0956bb2192e334f41ba
BLAKE2b-256 checksum
How to use checksums
342a9f4b13ffe4a876f12ad7d7321a928f910865ff0c50aa91d3725ac1181287
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / win_precise_time-1.4.2-cp38-cp38-win_amd64.whl

Download URL win_precise_time-1.4.2-cp38-cp38-win_amd64.whl
Size 14.9 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
b5d83420925beca302b386b19c3e7414ada84b47b42f0680207f1508917a1731
BLAKE2b-256 checksum
How to use checksums
e533f582f0a130f3362f2d0dd0d98f69b0f4f95a079f2390161b1773102fcc06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / win_precise_time-1.4.2-cp38-cp38-win32.whl

Download URL win_precise_time-1.4.2-cp38-cp38-win32.whl
Size 14.7 kB
Tags CPython 3.8 Windows x86-32
SHA-256 checksum
How to use checksums
0a953b00772f205602fa712ef68387b8fb213a30b267ae310aa56bf17605e11b
BLAKE2b-256 checksum
How to use checksums
d32b2b0d6c0b92cb755ac4f5b64bc8d3dbd2dc5e39b711cded12f367be43afcc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / win_precise_time-1.4.2-cp37-cp37m-win_amd64.whl

Download URL win_precise_time-1.4.2-cp37-cp37m-win_amd64.whl
Size 15.0 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
07ef644d1bb7705039bc54abfe4b45e99e8dc326dfd1dad5831dab19670508cb
BLAKE2b-256 checksum
How to use checksums
c44b62a120dae678446d33a1a0e888df19d89c95eee1c8df4ec8d45bd93199b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / win_precise_time-1.4.2-cp37-cp37m-win32.whl

Download URL win_precise_time-1.4.2-cp37-cp37m-win32.whl
Size 14.7 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
3e23693201a0fc6ca39f016871e2581e20c91123734bd48a69259f8c8724eedb
BLAKE2b-256 checksum
How to use checksums
ef4446111dd608cfac2f6433b98632495f630af5a7049b809cb7eb48e58d82bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release history Release notifications | RSS feed

This release

1.4.2 This release

13 release files

1.3.1

11 release files

1.3.0

11 release files

1.1.0

11 release files

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