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.0.2.tar.gz (39.3 kB view hashes)

Uploaded Source

Built Distribution

etawatch-1.0.2-py3-none-any.whl (27.5 kB view hashes)

Uploaded Python 3

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