tickcount returns always 1000 - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: tickcount returns always 1000 (
/showthread.php?tid=125483)
tickcount returns always 1000 -
Dark_Kostas - 04.02.2010
I tried to use tickcount, but it always returns 1000.
pawn Код:
new test;
test = GetTickCount();
printf("%d", test);//This will return normal tickcount
tickcount(test);
printf("%d", test);//This will return 1000
Re: tickcount returns always 1000 -
Sergei - 04.02.2010
What does tickcount(test) do?
Re: tickcount returns always 1000 -
Zamaroht - 04.02.2010
https://sampwiki.blast.hk/wiki/Tickcount
That means that tickcount() RETURNS the tickcount, the parameter returns the amount of miliseconds in 1 second. So, if granularity is 1000, it means that it is being accurate. Or that's what I understood.
Also, GetTickCount returns the time that the -computer- has been on. tickcount() returns the time that the server has been up.
Re: tickcount returns always 1000 -
mansonh - 04.02.2010
From
https://sampwiki.blast.hk/wiki/Tickcount
tickcount(&granularity=0)
&granularity=0 Upon return, this value contains the number of ticks that the internal system time will tick per second. This value therefore indicates the accuracy of the return value of this function.
Returns The number of milliseconds since start-up of the system. For a 32-bit cell, this count overfows after approximately 24 days of continuous operation.
so you want the return, no the granularity.
Quote:
Originally Posted by Dark_Kostas
I tried to use tickcount, but it always returns 1000.
pawn Код:
new test; test = GetTickCount(); printf("%d", test);//This will return normal tickcount test = tickcount(); printf("%d", test);//This will return 1000
|
Re: tickcount returns always 1000 -
MadeMan - 04.02.2010
Example of what is what:
pawn Код:
new tick, granularity;
tick = tickcount(granularity);