Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #34181 [Stopwatch] Fixed bug in getDuration when counting multipl…
…e ongoing periods (TimoBakx) This PR was merged into the 3.4 branch. Discussion ---------- [Stopwatch] Fixed bug in getDuration when counting multiple ongoing periods | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #34087 | License | MIT | Doc PR | N/A When running multiple periods in StopwatchEvent (start multiple times and not stop them all), the getDuration() method would return unexpected values. This was because at every stop, the last entry in the `started` array was removed, while the `getDuration` method was still expecting all the started events to still be there. Now, when calling `getDuration`, the duration of all the finished periods are added together with the unfinished counts. Commits ------- af00d8d [Stopwatch] Fixed bug in getDuration when counting multiple ongoing periods
- Loading branch information