There is registerTimehandler function and as I know it will call indicated method every n-seconds. But what I must do if I want that method will called only once in n-seconds?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
register the timerhandler for your method that you want to be called once, then call _in_ your registered method the unregisterTimerid(), that will avoid that the method will be called again... so its only once called, like you want... for more info about how to unregister a timer see this post: http://sourceforge.net/forum/forum.php?thread_id=791813&forum_id=204500
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is registerTimehandler function and as I know it will call indicated method every n-seconds. But what I must do if I want that method will called only once in n-seconds?
that is pretty easy, just a logical thing...
register the timerhandler for your method that you want to be called once, then call _in_ your registered method the unregisterTimerid(), that will avoid that the method will be called again... so its only once called, like you want... for more info about how to unregister a timer see this post:
http://sourceforge.net/forum/forum.php?thread_id=791813&forum_id=204500
if i use several timers (if it's possible) how to know their id?
of you can use several timers, the return value of the registerTimerhandler() method is the assigned id, like its documentated...
$id1 = $irc->registerActionhandler(...);
$id2 = $irc->registerActionhandler(...);
$id3 = $irc->registerActionhandler(...);
$irc->unregisterActionid($id1);
$irc->unregisterActionid($id2);
$irc->unregisterActionid($id3);
eeerrr, I meant "Time" not "Action"
but both work exactly the same ;)