From a8b50378d937241068f7cf188b212755ea9e2acd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Mon, 12 May 2014 20:07:56 +0200 Subject: [PATCH] timer listening $time parameter correctly renamed --- application/core/Callbacks/TimerListening.php | 6 +++--- application/core/Callbacks/TimerManager.php | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/application/core/Callbacks/TimerListening.php b/application/core/Callbacks/TimerListening.php index bc012408..81f4b4b6 100644 --- a/application/core/Callbacks/TimerListening.php +++ b/application/core/Callbacks/TimerListening.php @@ -25,14 +25,14 @@ class TimerListening { * * @param TimerListener $listener * @param string $method - * @param float $deltaSeconds + * @param float $milliSeconds * @param bool $oneTime * @param bool $instantCall */ - public function __construct(TimerListener $listener, $method, $deltaSeconds, $oneTime = false, $instantCall = true) { + public function __construct(TimerListener $listener, $method, $milliSeconds, $oneTime = false, $instantCall = true) { $this->listener = $listener; $this->method = $method; - $this->deltaTime = $deltaSeconds / 1000.; + $this->deltaTime = $milliSeconds / 1000.; $this->oneTime = (bool)$oneTime; $this->instantCall = (bool)$instantCall; if (!$this->instantCall) { diff --git a/application/core/Callbacks/TimerManager.php b/application/core/Callbacks/TimerManager.php index 399355f8..e59e44c4 100644 --- a/application/core/Callbacks/TimerManager.php +++ b/application/core/Callbacks/TimerManager.php @@ -32,10 +32,10 @@ class TimerManager { * * @param TimerListener $listener * @param string $method - * @param float $seconds + * @param float $milliSeconds */ - public function registerOneTimeListening(TimerListener $listener, $method, $seconds) { - $this->registerTimerListening($listener, $method, $seconds, true); + public function registerOneTimeListening(TimerListener $listener, $method, $milliSeconds) { + $this->registerTimerListening($listener, $method, $milliSeconds, true); } /** @@ -43,18 +43,18 @@ class TimerManager { * * @param TimerListener $listener * @param string $method - * @param float $seconds + * @param float $milliSeconds * @param bool $oneTime * @return bool */ - public function registerTimerListening(TimerListener $listener, $method, $seconds, $oneTime = false) { + public function registerTimerListening(TimerListener $listener, $method, $milliSeconds, $oneTime = false) { if ((!is_string($method) || !method_exists($listener, $method)) && !is_callable($method)) { trigger_error("Given Listener (" . get_class($listener) . ") can't handle Timer Callback (No Method '{$method}')!"); return false; } // Build Timer Listening - $listening = new TimerListening($listener, $method, $seconds, $oneTime); + $listening = new TimerListening($listener, $method, $milliSeconds, $oneTime); array_push($this->timerListenings, $listening); return true;