Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow option to run the loop at a specified slower rate #1566

Open
4 of 6 tasks
tblaha opened this issue Apr 15, 2024 · 0 comments
Open
4 of 6 tasks

Allow option to run the loop at a specified slower rate #1566

tblaha opened this issue Apr 15, 2024 · 0 comments

Comments

@tblaha
Copy link

tblaha commented Apr 15, 2024

  • I have marked all applicable categories:
    • documentation request (i.e. "X is missing from the documentation." If instead I want to ask "how to use X?" I understand StackOverflow#tqdm is more appropriate)
    • new feature request
  • I have visited the source website, and in particular
    read the known issues
  • I have searched through the issue tracker for duplicates
  • I have mentioned version numbers, operating system and
    environment, where applicable:
    import tqdm, sys
    print(tqdm.__version__, sys.version, sys.platform)

I often write loops that i need to slow down (for real time simulations, animations, sending data to peripherals at specific intervals). Now I often add boilerplate sleep code to my loop, but it could easily be integrated into tqdm. I would love it if there was an option like for i in tqdm(range(N), target_looptime=0.01): and then i not only get a progress bar, but also my loop runs at 100 iterations per (wall-clock) second, if possible. If not possible, then the loop should run as fast as possible as if the option was never specified.

Do you see this as feasible/desirable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant