Like a stopwatch, but it also gives you an ETA
Project description
Etawatch
Like a stopwatch, but it also gives you an ETA.
Example usage:
# construction immediately starts timer
eta_watch = etawatch(5)
for i in range(number_of_laps):
# do some work
time.sleep(random.randint(1, 3))
eta, lap = eta_watch()
print(f'Lap: {i+1} | Time: {lap:.2f} sec | ETA: {eta:.2f} min')
Another example:
for i, (eta, lap) in enumerate(etawatch(5)):
# do some work
time.sleep(random.randint(1, 3))
print(f'Lap: {i+1} | Time: {lap:.2f} sec | ETA: {eta:.2f} min')
It can optionally predict ETA by only the last n number of runs.
# will only calculate ETAs based on last 3 lap times
eta = etawatch(10, 3)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
etawatch-1.1.3.tar.gz
(42.0 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
etawatch-1.1.3-py3-none-any.whl
(27.2 kB
view details)
File details
Details for the file etawatch-1.1.3.tar.gz.
File metadata
- Download URL: etawatch-1.1.3.tar.gz
- Upload date:
- Size: 42.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77df12ee6a19891b2e271af5b304a3b14e0f57cfb4113335df3d8e33d52a7f4d
|
|
| MD5 |
92d379b28fef851d7ba56f02621223f1
|
|
| BLAKE2b-256 |
2f639f35964debb92fc62f4cdbfdda77e9e424bc707a53a96b5e460e596636e6
|
File details
Details for the file etawatch-1.1.3-py3-none-any.whl.
File metadata
- Download URL: etawatch-1.1.3-py3-none-any.whl
- Upload date:
- Size: 27.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dcf53bc8caf8f800f0f5740bab1cda9efeae7c5df1a28bca042c60a2a4485ab
|
|
| MD5 |
920bcca722fe39af9a0a6b7bae9175ff
|
|
| BLAKE2b-256 |
8bca9052ea2a241e32c5cf0d6f5c0efa7491f9d4e07c3908c7a235b1176127fe
|