if(System.currentTimeMillis() > _thrust_lag + _thrust_delay);
{
this._thrust3Position = new_Position;
Log.w("Thrust Lag + Delay", Long.toString(_thrust_lag + _thrust_delay));
Log.w("Current Time", Long.toString(System.currentTimeMillis()));
_thrust_lag = System.currentTimeMillis();
}
The output is:
Thrust Lag + Delay : 1333710037096
CurrentTime : 1333710027174
_thrust_delay = 10000 btw.
This should return false but it’s not, it keeps outputting this statement. Anyone any ideas? Or am I missing something fundamental here?
All the variables within this statement are longs, also _thrust_lag only gets set once in the constructor and in this function, so the problem lye’s here.
Trailing
;at end ofifstatement: remove it.The trailing
;semi-colon results in a branch with no statements being executed:is same as:
This means in the posted code the statements within the
{}are always executed.