mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 20:07:09 +00:00
TimingsHandler: use a try/finally block in time()
This commit is contained in:
parent
f349a58f2b
commit
de6053de11
@ -186,8 +186,11 @@ class TimingsHandler{
|
|||||||
|
|
||||||
public function time(\Closure $closure) : void{
|
public function time(\Closure $closure) : void{
|
||||||
$this->startTiming();
|
$this->startTiming();
|
||||||
$closure();
|
try{
|
||||||
$this->stopTiming();
|
$closure();
|
||||||
|
}finally{
|
||||||
|
$this->stopTiming();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function reset() : void{
|
public function reset() : void{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user