GetFrameTimeSeconds, GetGameTimeMilliseconds
Hey guys, I was wondering in how far those two functions differ from each other except for returning different time formats (ms and s) and why they are not listed in the Wiki.
Can anybody help with those questions? And from an coding elegance/performance PoV: which one should I use when manually checking on effect/buff/debuff durations? The existance of both provide some inconsistency in my addons since GetAbilityDuration() will return values comparable against GameTimeMs while EVENT_EFFECT_CHANGED returns `endTime` in FrameTimeSeconds, of course I could convert them. |
There is also GetFrameTimeMilliseconds()
GetFrameTimeMilliseconds() gives a timestamp in milliseconds, where the frame your Lua code currently runs for, started to render. It keeps the value until all Lua is done. While GetGameTimeMilliseconds() is continous even within the frame. => GetGameTimeMilliseconds()>=GetFrameTimeMilliseconds(). If you need time quantized to the frame use GetFrameTimeMilliseconds(). Even if GetGameTimeMilliseconds()-GetFrameTimeMilliseconds() >= 2000, the user has not seen it, because the screen has freezed. ;) |
Thx for the answer, though I am afraid I don't know enough about how stuff is rendered, just know about scripting :/
What do u mean by "until all lua is done"? Let's say I just log in, addons just finished initializing. Shouldn't FrameTime start from 0 if it works the way you described it? And what do you mean by "continous"? Continous from what? Cheers, Letho |
Quote:
"continous" in time. /edit: And I think it is something like time since starting the eso executable. |
Damn, that sounds complicated. Is there any literature around rendering frames or did you find that out by testing?
|
Quote:
Yes, just try it out yourself. All you need to know is: GetFrameTimeMilliseconds() is a timestamp, while GetGameTimeMilliseconds() is the always updated "now". |
Aaaah that sums it up pretty well, so GameTimeMilliseconds is the way to go for me, thx a lot :)
|
All times are GMT -6. The time now is 11:27 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI