About Store Forum Documentation Contact



Post Reply 
Quite big Tm.curTime deltas in no code places.
Author Message
menajev Offline
Member

Post: #1
Quite big Tm.curTime deltas in no code places.
I tried to find places in code, which decreases fps a lot.
I use such code combination:
Code:
Flt delta = Tm.curTime();
if(Kb.bp(KB_E))LogN(S+"update 1 "+Tm.curTime()+ (Tm.curTime()-delta));
but it sometimes returns:
Quote:update start 6.4950.000
update .1 6.5040.010
It's stranger if u see code:
Code:
if(Kb.bp(KB_E))LogN(S+"update start "+Tm.curTime()+ (Tm.curTime()-delta));
//LoadWeather();
if(Kb.bp(KB_E))LogN(S+"update .1 "+Tm.curTime()+ (Tm.curTime()-delta));
In such code places i get sometimes higher delta then after Renderer(Render);
What could be reason of such issue? I used same codes few months ago and it returned correctly values.
(This post was last modified: 04-21-2010 06:37 PM by menajev.)
04-21-2010 06:35 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Quite big Tm.curTime deltas in no code places.
I don't exactly understand your code,
you should have something like this:
Code:
Flt time=Time.curTime();
..do some processing..
LogN(S+"process time:"+(Time.curTime()-time));

if you have 'Tm' instead of 'Time' then you're using old engine version
04-21-2010 06:42 PM
Find all posts by this user Quote this message in a reply
menajev Offline
Member

Post: #3
RE: Quite big Tm.curTime deltas in no code places.
No, just "#define Tm Time" - i got used to it. wink
I put this code ("LogN...") after a few lines of code but i after deleting few lines somewhere there is no code between them - but there is time delta which i don't understand.
04-21-2010 07:07 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Quite big Tm.curTime deltas in no code places.
so you mean like this:

Code:
Flt time=Time.curTime();
// here no code
LogN(S+"process time:"+(Time.curTime()-time));

how many cpu cores do you have?
which DX version are you using?
maybe its just some slow down from background thread/process,
or due to File appending (disk IO operations)
04-21-2010 07:30 PM
Find all posts by this user Quote this message in a reply
menajev Offline
Member

Post: #5
RE: Quite big Tm.curTime deltas in no code places.
1 core (but my graphic artists have more and he has same problem), DX 9 (I did't upgrade enegine for ther version with DX 10).
This is quite strange because it's not constant - if press 'e' to start logging random and usually whole update function duration is about .010 but sometimes few lines of lasts e.g. .100.
In addition, this is only in menu - in game fps is twice bigger (altought there is much more to render and calculate) but i can't find out any huge differences between them.
04-22-2010 06:44 AM
Find all posts by this user Quote this message in a reply
Post Reply