-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Stopwatch] Add getLastPeriod
method to StopwatchEvent
#54855
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
Conversation
It looks like you unchecked the "Allow edits from maintainer" box. That is fine, but please note that if you have multiple commits, you'll need to squash your commits into one before this can be merged. Or, you can check the "Allow edits from maintainers" box and the maintainer can squash for you. Cheers! Carsonbot |
getLastPeriod
method to StopwatchEvent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For 7.2
the new method should also be documented in the changelog file of the Stopwatch component |
287b821
to
47b86f8
Compare
47b86f8
to
5c25139
Compare
@xabbuh Updated as requested! Anything else left to do? |
Thank you @hacfi. |
It's often useful to just get the last period (if you start and stop an event several times).
Example
https://github.com/doctrine/migrations/blob/3.7.x/lib/Doctrine/Migrations/Version/DbalExecutor.php#L167-L168
This adds a simple
getLastPeriod
method on theStopwatchEvent
class.