Skip to content
New issue

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

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

Already on GitHub? # to your account

Util\Timing::getHumanReadableDuration: improve time display #658

Merged
merged 2 commits into from
Nov 2, 2024

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Oct 31, 2024

Description

Util\Timing::getHumanReadableDuration: improve time display

This commit makes some tiny changes to how the run time is displayed:

  • For "exactly 1 second", display 1 secs instead of 1000ms.
  • For "exactly 1 minute", display 1 mins instead of 60 secs.
  • When minutes are displayed, only display seconds when there are seconds to display (so no # mins, 0 secs).

Includes updating the tests to match.

Util\Timing::getHumanReadableDuration: magic numbers to constants

Make the code more self-descriptive and use less "magic numbers" by declaring a couple of constants.

Suggested changelog entry

Minor improvements to the display of runtime information.

jrfnl added 2 commits October 31, 2024 19:59
This commit makes some tiny changes to how the run time is displayed:
* For "exactly 1 second", display `1 secs` instead of `1000ms`.
* For "exactly 1 minute", display `1 mins` instead of `60 secs`.
* When minutes are displayed, only display seconds when there are seconds to display (so no `# mins, 0 secs`).

Includes updating the tests to match.
Make the code more self-descriptive and use less "magic numbers" by declaring a couple of constants.
@jrfnl jrfnl added this to the 3.11.0 milestone Oct 31, 2024
@jrfnl jrfnl merged commit db1ebe1 into master Nov 2, 2024
52 checks passed
@jrfnl jrfnl deleted the feature/util-timer-gethumanreadableduration-improve branch November 2, 2024 09:09
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant