0
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();
}
輸出是: 推力滯後+延時:1333710037096 CURRENTTIME:1333710027174當前時間IF語句GT ThrustLag
_thrust_delay = 10000 BTW。
這應該返回false但它不是,它不斷輸出這個語句。任何任何想法?還是我錯過了一些基本的東西?
這個語句中的所有變量都是長整型的,_thrust_lag在構造函數和函數中只被設置一次,所以問題點在這裏。
OMG的東西很簡單,我看着這個30分鐘,並認爲WTF?非常感謝! – 2012-04-06 11:14:11
+1很好抓。 – 2012-04-06 11:15:33