Simple ticker for use on linux platform. Maximum tick resolution is 1 millisecond.
Install using pip:
pip install linux-ticker
Simple use shown below:
from linux_ticker import Ticker, RepeatedTicker
def hello(interval):
print(f'hello() woke after {interval[0]}s')
Repeat the ticker every 0.002 seconds for 2 times:
repeated_ticker = RepeatedTicker(interval=0.002, count=2)
repeated_ticker.tickback(hello, args=(repeated_ticker.interval,))
Execute lambda:
repeated_ticker.tickback(lambda x: print(f'lambda woke after {x[0]}s'), args=(repeated_ticker.interval,))
No tickback - only ticks:
repeated_ticker.tickback(None, args=())
Repeat the ticker every 0.01 second
simple_ticker = Ticker(interval=0.01)
try:
while simple_ticker.tick():
print(f'simple ticker woke after {simple_ticker}s')
finally:
simple_ticker.stop()
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
linux_ticker-0.0.12.tar.gz
(3.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file linux_ticker-0.0.12.tar.gz.
File metadata
- Download URL: linux_ticker-0.0.12.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7dff81e3d3026c1a7731523ca0bfc0d9c9ed19f9e7be95c0b26de9f788e7333
|
|
| MD5 |
cb6f72221f60bf7332c778533842bca0
|
|
| BLAKE2b-256 |
534c80603442ea8a0c4a5fb375601ea77f10c8e34006da5e0f5e7b6ab5db97d9
|
File details
Details for the file linux_ticker-0.0.12-py2.py3-none-any.whl.
File metadata
- Download URL: linux_ticker-0.0.12-py2.py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01fa21a790b5b4711705ab2ad5c2aab518ed1fa63fe87babb440d4b388c87259
|
|
| MD5 |
1cb2f4fb0af48a444d857c12dd3e910a
|
|
| BLAKE2b-256 |
7a59fcf4be52e6115e06d951dcd60037801447057566104b389aaea44fc72434
|