Skip to main content

Like a stopwatch, but it also gives you an ETA

Reason this release was yanked:

Import is broken

Project description

Etawatch

Like a stopwatch, but it also gives you an ETA.

Example usage:

number_of_laps = 10

# construction immediately starts timer
eta = etawatch(number_of_laps)

for i in range(number_of_laps):
    time.sleep(random.randint(1, 5))
    eta, iteration_time = eta()
    print(f'Time: {iteration_time:.2f} sec | Done in {eta:.2f} min')

Another example:

number_of_laps = 10

for i, eta, last_iter_time in enumerate(etawatch(number_of_laps)):
    time.sleep(random.randint(1, 5))
    print(f'Time: {iteration_time:.2f} sec | Done in {eta:.2f} min')

It can optionally predict ETA by only the last n number of runs.

# will run 10 laps but only return ETAs based on last 3
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.0.tar.gz (39.2 kB view hashes)

Uploaded Source

Built Distribution

etawatch-1.0.0-py3-none-any.whl (27.4 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