Merge "Add release notes entry for wgRelevantArticleId"
[lhc/web/wiklou.git] / includes / profiler / ProfilerStandard.php
index 15c5cdd..ab5e3ab 100644 (file)
@@ -227,6 +227,15 @@ class ProfilerStandard extends Profiler {
                }
        }
 
+       public function scopedProfileIn( $section ) {
+               $this->profileIn( $section );
+
+               $that = $this;
+               return new ScopedCallback( function() use ( $that, $section ) {
+                       $that->profileOut( $section );
+               } );
+       }
+
        /**
         * Close opened profiling sections
         */