Skip to content

Customised timer format #236

@odisseus

Description

@odisseus

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions