halt function lags server like hell
#1

Just downloaded this friggin thing and when the halt code is executed, the server lags like hell. after the halt is done, it goes back to normal. any suggestions?

Код:
halt(seconds)
{
	new _newTime[4], _oldTime[4];
	gettime(_oldTime[0], _oldTime[1], _oldTime[2]);
	_oldTime[3] = _oldTime[2] + (_oldTime[1] * 60) + (_oldTime[0] * 600);

	while(_newTime[3] != (_oldTime[3] + seconds))
	{
		gettime(_newTime[0], _newTime[1], _newTime[2]);
		_newTime[3] = _newTime[2] + (_newTime[1] * 60) + (_newTime[0] * 600);
	}
}
Reply
#2

That's what halt is supposed to do from looking at the code.
Reply
#3

It taked more then 1 second to execute this function? then you have a really big problem dude.

Why using arrays? you wasting memory like hell, remove the arrays.
Reply
#4

Halt is suppost to, When a halt is executed, it Freezes the server. Not what your halting.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)