Hi all I have a piece of code which looks like this:
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
}
}
So IERS stated that the next leap second is to occur immediately after 30th June 2012 11:59.9.
I was wondering if I'm right to say that if line 1 is run at 0.9 seconds after 30th June 2012 11:59.9 turns 1st July 2012 00:00.0,
And line 2 is run at 0.1 second after line 1,
The result of b - a
could be negative ? (-900 milliseconds)
If that's the case, is it true that if line 5 is run at 0.9 seconds after 30th June 2012 11:59.9 turns 1st July 2012 00:00.0,
And line 6 is run at 0.1 second after line 5,
The result of z - y
could be negative ? (-900,000,000 nanoseconds?)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…