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

Customised timer format #236

Open
odisseus opened this issue Mar 28, 2024 · 1 comment · May be fixed by #239
Open

Customised timer format #236

odisseus opened this issue Mar 28, 2024 · 1 comment · May be fixed by #239

Comments

@odisseus
Copy link

odisseus commented Mar 28, 2024

The timer feature is certainly nice to have, but its hardcoded format of " ({}.{:02.0f})" is perhaps not the best choice in some cases. In my particular example, the tasks usually take minutes to hours, and the user doesn't care about fractions of a second.

I suggest modifying the timer argument to accept str | bool. The logic would look like this:

  • False: no timer
  • True: timer with the default formatting
  • any s: str: timer with s as its format string,
    • s must have one or two slots, otherwise throw an exception.
@pavdmyt
Copy link
Owner

pavdmyt commented Apr 3, 2024

Sounds good! Feel free to open PR 👍🏼

@odisseus odisseus linked a pull request Apr 9, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants