Timer Problem
#1

Hello,
i have problem with timer. I guess someone wrong on count. timer going like a 1 2 3 5 6 7 9 .. So sometimes server adding extra +1 sec. How can i fix this?


Код:
timerDate = SetTimer("DateCheck", 1000, 1);
Код:
..
getdate(s_year, s_month, s_day);
gettime(ccurHour, ccurMinute, ccurSecond);
format(timestr,128,"%02d.%02d.%02d %02d:%02d,%02d"s_day,s_month,s_year,ccurHour, ccurMinute, ccurSecond);
TextDrawSetString(txtTimeDisp,timestr);
..
Out: 07.08.2012 04:04,21
Reply
#2

try SetTimerEx
Reply
#3

Edit: Nvm
Reply
#4

The reason of your problem might be that timers are not very accurate.

Read this: https://sampforum.blast.hk/showthread.php?tid=289675
Reply
#5

Quote:
Originally Posted by Universal
Посмотреть сообщение
The reason of your problem might be that timers are not very accurate.

Read this: https://sampforum.blast.hk/showthread.php?tid=289675
Thanks, works like a boss
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)