Varius Time subsystem inaccuracies/questions.

Why is "m_lBaseTime" adjusted?

Code: Select all

// Adjust the base time so that time actually seems to have moved forward m_fFrameTime m_lBaseTime += realTicks - simTicks;
In my edits, m_lBaseTime is not adjusted and just used as the 'time at last reset' as normal.
Removing this adjustment has not impacted times/timers negatively and made it easier to debug level startup/etc. accurately.

On that note, GetAsyncCurTime() gets reduced randomly across frames when the base-time adjustment is in effect (default CE engine).
Could someone, PLEASE, explain what "GetAsyncCurTime()" is used for, and if this is intended?
Last edited by Personwithhat2 on Tue Jan 22, 2019 6:02 pm, edited 2 times in total.

Re: Timer questions

GetAsyncCurTime get the number of seconds since boot up. It is generally used to check whether a period of time has passed to action things, eg, how long after a grenade is primed before it explodes).
I am unsure why base time is adjusted specifically but it may be due to pausing the game.
CRYENGINE Technical Community Manager
Here to help the community and social channels grow and thrive.

My personal belongings;
Beginner Guides | My GitHub | Splash Plugin

Re: Timer questions

Pausing is unrelated. Pausing only affects game simulation time, not UI time (which is monotic blah blah and unaffected by pausing/smoothing/etc.), BUT adjustment offsets the base time for both.

Due to timer adjustment GetAsyncCurTime() is heavily inaccurate and does not properly return the number of seconds since boot. Removing the adjustment makes it return what you think it does .-.

Not that hard to test, spam GetAsyncCurTime() during boot (really anywhere) with and without the timer adjustment and compare values.

Hence why I'm asking this, hopefully you can bother someone, I have about 3-4 more Timer.cpp related questions >.<

Who is online

Users browsing this forum: No registered users and 0 guests