我正在使用下面的代码,但得到了不应该的 -ve 值!..
Calendar calendar = Calendar.getInstance();
calendar.clear();
calendar.set(2013, 10, 31, 23, 00);
ctim=calendar.getTimeInMillis();//system time at shut down
calendar.clear();
calendar.set(2013, 11, 1, 1, 00);
long cTime = calendar.getTimeInMillis();//system time at restart
timediff = cTime-ctim;
我不知道它有什么问题..??!!