Thread: Closer Timer?
View Single Post
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 03-26-2012 , 04:45   Re: Closer Timer?
Reply With Quote #9

Quote:
Originally Posted by RedSword View Post
(doc) For profiling the engine != (berni) only for profiling the engine...
erm do you see other use cases mentioned ? no ? me neither.

The reason why you can't get more accurate than GetGameTime() is because the game is based on frames. The frame rate resolution is usually around ~60 frames / second. 60 frames / second => each 0,0166 seconds a frame is processed. The origin of a player is only updated each frame, there is nothing inbetween. GetEngineTime() is much more accurate, but this accuracy is pretty useless for game stuff because you can only call this function when a frame is processed.

GetGameTime() is what is used in the game's code also internally, it has a resolution of 1 / framerate.
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0

Last edited by berni; 03-26-2012 at 04:46.
berni is offline