No project description provided
Project description
win-precise-time
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.
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
Built Distributions
Hashes for win_precise_time-1.4.2-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85670f77cc8accd8f1e6d05073999f77561c23012a9ee988cbd44bb7ce655062 |
|
MD5 | 04731dcf7811199485c2f3ebc4828c35 |
|
BLAKE2b-256 | 17197ea9a22a69fc23d5ca02e8edf65e4a335a210497794af1af0ef8fda91fa0 |
Hashes for win_precise_time-1.4.2-cp312-cp312-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0210dcea88a520c91de1708ae4c881e3c0ddc956daa08b9eabf2b7c35f3109f5 |
|
MD5 | 58deac667990997a33cab96d203eb1a0 |
|
BLAKE2b-256 | 2e9655a14b5c0e90439951f4a72672223bba81a5f882033c5850f8a6c7f4308b |
Hashes for win_precise_time-1.4.2-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0897bb055f19f3b4336e2ba6bee0115ac20fd7ec615a6d736632e2df77f8851a |
|
MD5 | 440ad8087e2648baa055aedff6d96b70 |
|
BLAKE2b-256 | f99c46d69220d468c82ca2044284c5a8089705c5eb66be416abcbba156365a14 |
Hashes for win_precise_time-1.4.2-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59272655ad6f36910d0b585969402386fa627fca3be24acc9a21be1d550e5db8 |
|
MD5 | f025f6753733e6a8778083cad1403c9f |
|
BLAKE2b-256 | bbd6a48717649fea2d7a6679db86dae9ae4b12078c7a48aa89a8f14a360f29d0 |
Hashes for win_precise_time-1.4.2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb8e44b0fc35fde268e8a781cdcd9f47d47abcd8089465d2d1d1063976411c8e |
|
MD5 | 3c304714899d82a089d1da38d72564f4 |
|
BLAKE2b-256 | 257f5087d16a720b6833cb631b4b6f912b0ff433377227ecbbc494453951cbb5 |
Hashes for win_precise_time-1.4.2-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fa13a2247c2ef41cd5e9b930f40716eacc7fc1f079ea72853bd5613fe087a1a |
|
MD5 | f681cdeb32a5d665b11634da809467f4 |
|
BLAKE2b-256 | f78bba6bdef9284fd75f816205bf9a198a2cf7b22459ff401174143ade5afe08 |
Hashes for win_precise_time-1.4.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f510fa92d9c39ea533c983e1d62c7bc66fdf0a3e3c3bdda48d4ebb634ff7034 |
|
MD5 | d4d9ab005ffe711ccb2d61ebe4761d79 |
|
BLAKE2b-256 | 17cf4237d55123e107f32ba1417d00f7b0ea0e894bb68e495678db52bdccab5b |
Hashes for win_precise_time-1.4.2-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50d11a6ff92e1be96a8d4bee99ff6dc07a0ea0e2a392b0956bb2192e334f41ba |
|
MD5 | 38af8e601552d0bd140b84146a67ee8c |
|
BLAKE2b-256 | 342a9f4b13ffe4a876f12ad7d7321a928f910865ff0c50aa91d3725ac1181287 |
Hashes for win_precise_time-1.4.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5d83420925beca302b386b19c3e7414ada84b47b42f0680207f1508917a1731 |
|
MD5 | 0f93c0274253f546107247d8b8891a7d |
|
BLAKE2b-256 | e533f582f0a130f3362f2d0dd0d98f69b0f4f95a079f2390161b1773102fcc06 |
Hashes for win_precise_time-1.4.2-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a953b00772f205602fa712ef68387b8fb213a30b267ae310aa56bf17605e11b |
|
MD5 | 31c8dff117f618f0f10c85b92287ae01 |
|
BLAKE2b-256 | d32b2b0d6c0b92cb755ac4f5b64bc8d3dbd2dc5e39b711cded12f367be43afcc |
Hashes for win_precise_time-1.4.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07ef644d1bb7705039bc54abfe4b45e99e8dc326dfd1dad5831dab19670508cb |
|
MD5 | c6ff2eb80a81637ddaa53e49d0452e8e |
|
BLAKE2b-256 | c44b62a120dae678446d33a1a0e888df19d89c95eee1c8df4ec8d45bd93199b3 |
Hashes for win_precise_time-1.4.2-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e23693201a0fc6ca39f016871e2581e20c91123734bd48a69259f8c8724eedb |
|
MD5 | 79c4e583cb8edc657de154dc6d359d3f |
|
BLAKE2b-256 | ef4446111dd608cfac2f6433b98632495f630af5a7049b809cb7eb48e58d82bb |