04.02.2011, 12:32
What would happen if i had a timer that gets called every second that has code in it which has execution time of more than a second?
Thanks.
Thanks.
#include <a_samp>
forward TEST();
public OnFilterScriptInit()
{
SetTimer("TEST", 1000, true);
return 1;
}
public TEST()
{
for(;;)
{
}
}
public TEST()
{
new ticks = GetTickCount();
while((GetTickCount() - ticks) < 2000) { } // takes 2 seconds to finish
}
#undef MAX_PLAYERS
#define MAX_PLAYERS (100) // Change this to your server slots