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

[Utils] getTimeStr: Round up the number of minutes correctly #2254

Merged
merged 1 commit into from
Jun 16, 2024

Conversation

cbentejac
Copy link
Contributor

Description

When getting times such as 359.5, the previous version of getTimeStr was returning "5m60s" instead of "6m0s" because the number of minutes was first computed, and the remaining seconds were rounded up and used as such. In some cases, rounding up those remaining seconds may lead to a full minute, which should be handled.

After minutes have been computed, we now check that the rounded up remainder does not correspond to a full minute before moving to the seconds.

@cbentejac cbentejac self-assigned this Nov 20, 2023
@cbentejac cbentejac added this to the Meshroom 2024.1.0 milestone Nov 20, 2023
@cbentejac cbentejac marked this pull request as draft November 21, 2023 16:57
Prevent getting strings like "5m60s" when rounding up.
@fabiencastan fabiencastan marked this pull request as ready for review June 16, 2024 21:35
@fabiencastan fabiencastan merged commit 4317037 into develop Jun 16, 2024
4 checks passed
@fabiencastan fabiencastan deleted the fix/elapsedTimeStr branch June 16, 2024 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants