Skip to content

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment