大家好我有一段看起来像这样的代码:
public class Test {
public static void main(String args[]) {
long a = System.currentTimeMillis(); // line 1
long b = System.currentTimeMillis(); // line 2
assert b - a >= 0;
long y = System.nanoTime(); // line 5
long z = System.nanoTime(); // line 6
}
}
Run Code Online (Sandbox Code Playgroud)
所以IERS表示下一个闰秒将在2012年6月30 日 11:59.9 之后立即发生.
我想知道我是否对,如果第1行在2012年6月30 日之后的0.9秒运行11:59.9转到2012年7月1 日 00:00.0,
第2行在第1行后的0.1秒运行,
结果b - a
可能是否定的?(-900毫秒)
如果是这种情况,如果第5行在2012年6月30 日之后的0.9秒运行11:59.9转到 …