Raised This Month: $ Target: $400
 0% 

Most accurate way to make a stopwatch/timer?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
MALON
Member
Join Date: Jan 2008
Old 08-21-2008 , 13:22   Most accurate way to make a stopwatch/timer?
Reply With Quote #1

What's the most accurate method to make a stopwatch/timer? I am looking to update my KZ plugin.

For example, make a set_task and increment something every .1 seconds and have the results of that be your time?

Or maybe do a start = get_gametime() then a finish = (get_gametime() - start)? (keep in mind i will have to use a set_task to keep a live display of a player's running time)


Additional question: Do timerbugs affect plugins or only map timers for KZ maps? If you don't know what a timerbug is, here's it's definition from xtreme-jumps:

"The KZ Timer isnt 100% exact, there are time shifts of 0,1-1 seconds on small maps (under 2 min) and shifts about 2-3 seconds on bigger maps (under 5 minutes) and time shifts up to 6 seconds on really big maps (5-15 minutes).
A timerbug occurs with a probability of 90% if the server is running longer than 60 minutes: The timer will show a better time than you actually achieved. (about 5-15 seconds better).
The probablity that a timerbug will occur if your server is running for less than 60 minutes is 0,0%."

Thanks,

--MALON
MALON is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:12.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode