unregister a single timer listening
This commit is contained in:
parent
1386e00ce3
commit
57375a6e8b
@ -34,6 +34,22 @@ class TimerManager {
|
||||
$this->registerTimerListening($listener, $method, $time, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters a Timer Listening
|
||||
* @param TimerListener $listener
|
||||
* @param $method
|
||||
* @return bool
|
||||
*/
|
||||
public function unregisterTimerListening(TimerListener $listener, $method){
|
||||
foreach($this->timerListenings as $key => $listening){
|
||||
if($listening->listener == $listener && $listening->method == $method){
|
||||
unset($this->timerListenings[$key]);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a Timing Listening, note < 10ms it can get inaccurate
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user