Skip to content

Instantly share code, notes, and snippets.

@mrakitin
Created January 26, 2025 19:57
Show Gist options
  • Save mrakitin/4bb4702358cfdcc7ebf61a5fe51d5592 to your computer and use it in GitHub Desktop.
Save mrakitin/4bb4702358cfdcc7ebf61a5fe51d5592 to your computer and use it in GitHub Desktop.
from time import sleep
import click
from tqdm import trange
@click.command()
@click.option("-c", "--count", default=60, help="Duration in seconds to wait")
def timer(count):
"""Wait for the specified number of seconds and print the progress bar."""
for _ in trange(int(count)):
sleep(1.0)
if __name__ == "__main__":
timer()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment