check if timer is running

Back to Module Development

Page: 1  
From User Message Body
dracozny
Post #733
Member
Date: 4:38 am, May 31 2008
Posts: 30


trying to figure out an alternative to init() running my timer, maybe I am just not understanding a few things.
I want my timer to run at startup, but I also have a few triggers set up. if a trigger is activated will it reinitialize the module?
if so how can we check if a timer is running and if so execute our functions yet leaving the timer alone?

Mad_Clog
Post #736
user avatar
Member
Date: 5:15 pm, Jun 3 2008
Posts: 176


Code
    // check if timer <name> is set or not
    private function timer_exists($timer)
    {
        $res = in_array($timer, array_keys($this->timerClass->getTimers()));
        if ($res === FALSE)
            return FALSE;
        return TRUE;
    }


aragno
Post #889
Member
Date: 10:49 am, Dec 28 2008
Posts: 15


As I understand it the module will not be reinitialized.

// aragno

you'll find me in #5thelement on netgamers
   

Back to Module Development