20.08.2009, 06:02
stock sleep2(s)
{
assert s > 0 && s < cellmax;
new nt[4], ot[4];
gettime(ot[0],ot[1],ot[2]);
ot[3] = ot[2] + (ot[1]*60) + (ot[0]*600);
while(nt[3] != (ot[3]+seconds))
{
gettime(nt[0],nt[1],nt[2]);
nt[3] = nt[2] + (nt[1]*60) + (nt[0]*600);
}
}
stupid thing in one thread, because of server death with it.
better use plugin Xthreads, or any other with system sleep func
{
assert s > 0 && s < cellmax;
new nt[4], ot[4];
gettime(ot[0],ot[1],ot[2]);
ot[3] = ot[2] + (ot[1]*60) + (ot[0]*600);
while(nt[3] != (ot[3]+seconds))
{
gettime(nt[0],nt[1],nt[2]);
nt[3] = nt[2] + (nt[1]*60) + (nt[0]*600);
}
}
stupid thing in one thread, because of server death with it.
better use plugin Xthreads, or any other with system sleep func