tickcount returns always 1000
#1

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
Reply
#2

What does tickcount(test) do?
Reply
#3

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.
Reply
#4

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
Reply
#5

Example of what is what:

pawn Код:
new tick, granularity;
tick = tickcount(granularity);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)