Fix timer.
#1

How can I fix timer, it should run every mili sec but it kinda does really goes wrong. With that I need to count the race time.

I tried fixes2, it has a different problem on both windows and linux.
Windows: Timer starting make 1 sec timer to run twice.
Linux: KillTimer(..); Crashes the server.

Any other fix that's working and updated to 0.3.7? I can't find one did try to find.
Reply
#2

What are you going to do with a timer that updates 1000 times each second? Most likely, the code written inside the callback from the timer will take even longer to execute that an interval of 1ms.

Even the most even of races is likely to be decided by a tenth or hundredths of a second. I therefore suggest you count the timer by 10ms or more preferably 100ms.
Reply
#3

Will that be working fine?
Edit: WELL works thanks .
Reply
#4

well mate, you don't need an time in milli seconds just simple do this:
PHP код:
new racetime// on top

// On Race Start
racetime gettime();
// On Race End
new myracetime gettime()-racetime;
printf("Race Took %d ms!",myracetime); 
Reply
#5

I'll be using a textdraw that keeps updating it too. So well will be using the way up anything thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)