Quantcast
What does the function GetFrameTimeMilliseconds() do? - ESOUI
Thread Tools Display Modes
06/14/20, 11:16 AM   #1
Gedalya
Join Date: May 2014
Posts: 5
What does the function GetFrameTimeMilliseconds() do?

I am new to writing addons. I have seen the following function in use in an existing addon:
GetFrameTimeMilliseconds()

It is not clear from context what it does; I also see no relevant information online. The Wiki for example has it listed among other functions but it lacks any annotation.

Thank you for your time.
  Reply With Quote
06/14/20, 12:00 PM   #2
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 150
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
06/14/20, 12:17 PM   #3
Gedalya
Join Date: May 2014
Posts: 5
Thank you!!!
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » What does the function GetFrameTimeMilliseconds() do?

Thread Tools
Display Modes

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

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