View Single Post
06/14/20, 12:00 PM   #2
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 167
There are two functions: GetGameTimeMilliseconds and GetFrameTimeMilliseconds.

GetGameTimeMilliseconds returns the number of milliseconds that passed since the game started, if I remember correctly.
It might also be since your login. Not entirely sure if it is since start or since login, but for most use cases it shouldn't matter, because it's usually used to get time differences.

GetFrameTimeMilliseconds is similar, it returns the number of milliseconds that have passed since the game started and the current frame started to render.
So when the game starts to render a frame, both functions return the same value, but if you have some code that runs for a few milliseconds, then GetGameTimeMilliseconds will return a larger number while GetFrameTimeMilliseconds still returns the same number.
For example if GetGameTimeMilliseconds() - GetFrameTimeMilliseconds() = 5, then it means 5 milliseconds have passed since the game started processing the current frame.
  Reply With Quote