TimingsHandler: use a try/finally block in time()

This commit is contained in:
Dylan K. Taylor 2019-06-11 14:54:54 +01:00
parent f349a58f2b
commit de6053de11

View File

@ -186,8 +186,11 @@ class TimingsHandler{
public function time(\Closure $closure) : void{
$this->startTiming();
$closure();
$this->stopTiming();
try{
$closure();
}finally{
$this->stopTiming();
}
}
public function reset() : void{