KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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 30 th 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 30 th June 2012 11:59.9 turns 1 st 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 30 th June 2012 11:59.9 turns 1 st 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?)
Tags (comma-separated)
Save Edits
Cancel