From 74decfd1d9f03f0ba28ed3c3a3749ee88020cfa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Mon, 12 May 2014 20:00:58 +0200 Subject: [PATCH] timer listening $time parameter 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 424d70ae..bc012408 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 $deltaTime + * @param float $deltaSeconds * @param bool $oneTime * @param bool $instantCall */ - public function __construct(TimerListener $listener, $method, $deltaTime, $oneTime = false, $instantCall = true) { + public function __construct(TimerListener $listener, $method, $deltaSeconds, $oneTime = false, $instantCall = true) { $this->listener = $listener; $this->method = $method; - $this->deltaTime = $deltaTime / 1000.; + $this->deltaTime = $deltaSeconds / 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 ee69a9f0..399355f8 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 $time + * @param float $seconds */ - public function registerOneTimeListening(TimerListener $listener, $method, $time) { - $this->registerTimerListening($listener, $method, $time, true); + public function registerOneTimeListening(TimerListener $listener, $method, $seconds) { + $this->registerTimerListening($listener, $method, $seconds, true); } /** @@ -43,18 +43,18 @@ class TimerManager { * * @param TimerListener $listener * @param string $method - * @param float $time + * @param float $seconds * @param bool $oneTime * @return bool */ - public function registerTimerListening(TimerListener $listener, $method, $time, $oneTime = false) { + public function registerTimerListening(TimerListener $listener, $method, $seconds, $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, $time, $oneTime); + $listening = new TimerListening($listener, $method, $seconds, $oneTime); array_push($this->timerListenings, $listening); return true;