Skip to main content

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


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)

Uploaded Source

Built Distribution

etawatch-1.1.3-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

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

Hashes for etawatch-1.1.3.tar.gz
Algorithm Hash digest
SHA256 77df12ee6a19891b2e271af5b304a3b14e0f57cfb4113335df3d8e33d52a7f4d
MD5 92d379b28fef851d7ba56f02621223f1
BLAKE2b-256 2f639f35964debb92fc62f4cdbfdda77e9e424bc707a53a96b5e460e596636e6

See more details on using hashes here.

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

Hashes for etawatch-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0dcf53bc8caf8f800f0f5740bab1cda9efeae7c5df1a28bca042c60a2a4485ab
MD5 920bcca722fe39af9a0a6b7bae9175ff
BLAKE2b-256 8bca9052ea2a241e32c5cf0d6f5c0efa7491f9d4e07c3908c7a235b1176127fe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page