Best way to make timers.
#1

Hi,

I just wanted to ask how is it better to make timers. I had this version in past:
pawn Code:
public OnGameModeInit()
{
    SetTimer("Timer1",200,1);
    SetTimer("Timer2",60000,1);
    SetTimer("Timer3",1000,1); //1 sec
    SetTimer("Timer4",3000,1);
    SetTimer("Timer5",1000,1); //1 sec
    SetTimer("Timer6",1000,1); //1 sec
}
But today i made something like this:
pawn Code:
public OnGameModeInit()
{
    SetTimer("Timer1",200,1);
    SetTimer("Timer2",60000,1);
    SetTimer("oneSecTimer",1000,1); //1 sec
    SetTimer("Timer4",3000,1);
}

oneSecTimer();
{
    Timer3();
    Timer5();
    Timer6();
}
Which one is better/causes less lags? And are there any other ways to make timers?

Thanks.
Reply


Messages In This Thread
Best way to make timers. - by CaHbKo - 06.01.2010, 20:38
Re: Best way to make timers. - by Miguel - 06.01.2010, 22:51

Forum Jump:


Users browsing this thread: 1 Guest(s)