Skip to content

Commit

Permalink
Removing a useless test in TTSystem::Tick() now we are sure the probl…
Browse files Browse the repository at this point in the history
…em is in TTSystem::computeDeltaTime when the currentTime is evaluated lower than mlastTime
  • Loading branch information
theod committed Dec 20, 2013
1 parent 1053551 commit 44704b6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Modular/extensions/System/source/System.cpp
Expand Up @@ -187,7 +187,14 @@ TTFloat64 System::computeDeltaTime()

if (mLastTime != 0) {

deltaInUs = (currentTime - mLastTime);
// it seems the currentTime is lower than the lastTime sometimes ...
if (currentTime < mLastTime) {

TTLogMessage("System::computeDeltaTime() : currentTime (%Lu) is lower than lastTime (%Lu)\n", currentTime, mLastTime);
deltaInUs = 0;
}
else
deltaInUs = (currentTime - mLastTime);

if (deltaInUs < granularityInUs) {

Expand Down

0 comments on commit 44704b6

Please sign in to comment.