DeBot Framework


DeBot\Timers
core/Timers.php at line 13

Class Timers

Singleton
└─Timers

public class Timers
extends Singleton

DeBot Core - Timers Created by dab ??? ?? 2009 Last Edited: Aug 15 2010 We maintain a time based

Author:
David (dab)
Version:
v1.0

Method Summary
string

addTimer(string sNick, integer iSeconds, integer iRepeat, object oFunction, array aParams)

Add a timer to be used.

void

delTimer(string iUID)

Delete a timer (Duh?)

void

load()

void

tick()

TICK TOCK TICK TOCK.

Methods inherited from DeBot\Singleton
__construct, obj

Method Detail

core/Timers.php at line 43

addTimer

public string addTimer(string sNick, integer iSeconds, integer iRepeat, object oFunction, array aParams)

Add a timer to be used.

Parameters:
sNick - the owner of the timer (bot)
iSeconds - the number of seconds to elapse.
iRepeat - the number of times to repeat > 1
oFunction - The object function array(class, 'function' )
aParams - The params to send to teh function/method call
Returns:
The ID of the Timer

core/Timers.php at line 63

delTimer

public void delTimer(string iUID)

Delete a timer (Duh?)

Parameters:
iUID - The ID of the timer to remove

core/Timers.php at line 28

load

public void load()

core/Timers.php at line 77

tick

public void tick()

TICK TOCK TICK TOCK. We check for timers to update. We update our $this->m_iTime and loop through our timers, ensure we are to tick. Then ExECUTE OUR FUNCTIONS! Sorry... 3:28 am... really loopy and tired.


DeBot Framework