Moved leftover event stop to the provider.
This commit is contained in:
1 parent
d8febfeb3a
commit
8396888ee2
2 files changed
+4
-7
No files matched your search
@@ -101,6 +101,10 @@ class Hook_Events_Provider implements ServiceProviderInterface, Bootable_Provide
|
|||||||
|
|
||||||
public function get_events() {
|
public function get_events() {
|
||||||
|
|
||||||
|
if ( $this->stopwatch->isStarted( 'Toolbar' ) ) {
|
||||||
|
$this->stopwatch->stop( 'Toolbar' );
|
||||||
|
}
|
||||||
|
|
||||||
$events = $this->stopwatch->getSectionEvents( '__root__' );
|
$events = $this->stopwatch->getSectionEvents( '__root__' );
|
||||||
|
|
||||||
return array_map( [ $this, 'transform' ], array_keys( $events ), $events );
|
return array_map( [ $this, 'transform' ], array_keys( $events ), $events );
|
||||||
|
|||||||
@@ -131,13 +131,6 @@ class Laps extends Container {
|
|||||||
|
|
||||||
global $timestart;
|
global $timestart;
|
||||||
|
|
||||||
/** @var Stopwatch $stopwatch */
|
|
||||||
$stopwatch = $this['stopwatch'];
|
|
||||||
|
|
||||||
if ( $stopwatch->isStarted( 'Toolbar' ) ) {
|
|
||||||
$stopwatch->stop( 'Toolbar' );
|
|
||||||
}
|
|
||||||
|
|
||||||
$events = [];
|
$events = [];
|
||||||
|
|
||||||
foreach ( $this->providers as $provider ) {
|
foreach ( $this->providers as $provider ) {
|
||||||
|
|||||||
Reference in new issue
Block a user