timer listening $time parameter correctly renamed

This commit is contained in:
Steffen Schröder 2014-05-12 20:07:56 +02:00
parent 74decfd1d9
commit a8b50378d9
2 changed files with 9 additions and 9 deletions

View File

@ -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) {

View File

@ -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;