README
━━━━━━━━
Table of Contents
─────────────────
1 wres
.. 1.1 Install
.. 1.2 Usage
.. 1.3 Util
.. 1.4 details
..... 1.4.1 `set_resolution'
..... 1.4.2 `query_resolution'
.. 1.5 License
1 wres
══════
Set/Get Winsows Timer Resolution.
wres is short for Windows RESolution.
The function of this module is like Windows API [timeBeginPeriod] and
[timeEndPeriod]. But the implementation used Undocumented
[NtSetTimerResolution] of NTDLL. It offers microsecond level control.
[timeBeginPeriod]
https://msdn.microsoft.com/en-us/library/dd757624(VS.85).aspx
[timeEndPeriod]
https://msdn.microsoft.com/en-us/library/dd757626(v%3Dvs.85).aspx
[NtSetTimerResolution]
http://undocumented.ntinternals.net/index.html?page%3DUserMode%252FUndocumented%2520Functions%252FTime%252FNtSetTimerResolution.html
1.1 Install
───────────
┌────
│ pip install wres
└────
1.2 Usage
─────────
┌────
│ import wres
│
│ # Query windows timer resolution in 100-ns units
│ minres, maxres, curres = wres.query_resolution()
│
│ # Set resolution to 1.5 ms
│ # Automatically restore previous resolution when exit with statement
│ with wres.set_resolution(15000):
│ pass
│
│ # Set resolution to max resolution
│ with wres.set_resolution():
│ pass
└────
1.3 Util
────────
After installing `wres', command `windows-resolution' is available.
┌────
│ usage: windows-resolution [-h] [-s RESOLUTION] [--setmax] [--setmin] [-v]
│
│ Set system timer tesolution. Show current system timer resolution without
│ argument.
│
│ optional arguments:
│ -h, --help show this help message and exit
│ -s RESOLUTION, --set RESOLUTION
│ set resolution in 100-ns units
│ --setmax set maximum resolution
│ --setmin set minimum resolution
│ -v, --version show version
└────
1.4 details
───────────
1.4.1 `set_resolution'
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
Set resolution of system timer.
Input:
`DesiredResolution' [default 0], in 100-ns units. This function
will auto revision the value if it is out of range, so default 0 means
set maximum resolution.
Should be used in `with' statement, target is current resolution, in
100-ns units.
1.4.2 `query_resolution'
╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
Query resolution of system timer.
Return a tuple of (min, max, current) resolution, in 100-ns units.
Ref to [NtQueryTimerResolution].
[NtQueryTimerResolution]
http://undocumented.ntinternals.net/index.html?page%3DUserMode%252FUndocumented%2520Functions%252FTime%252FNtQueryTimerResolution.html
1.5 License
───────────
Meme Kagurazaka (c) 2017, Public Domain.
Metadata
Release files for wres 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wres-1.0.3.tar.gz | 3.7 kB | Without provenance | Details for wres-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wres-1.0.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for wres-1.0.3-py2.py3-none-any.whl |
Total release size: 9.6 kB
Release files / wres-1.0.3.tar.gz
| Download URL | wres-1.0.3.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
99301f9bded7dc0af52c5f2d184149e18027888ea1e1a7424eaab31d3376f718
|
|
BLAKE2b-256 checksum How to use checksums |
77bcbca6c33bef30346e586a4deee30049ebbc8786c7345ef501d7ecb83c65e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / wres-1.0.3-py2.py3-none-any.whl
| Download URL | wres-1.0.3-py2.py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
70705fc68a7718cddb76e789ca4f66b73178c513793c1e386b48d17df96b220f
|
|
BLAKE2b-256 checksum How to use checksums |
bf2e046023e5df54d11591636409230d2eb6bcb8ad339a44368ef30d33d225cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for wres 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.