Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8084448 | emb-9 | Brian Burkhalter | P3 | Resolved | Fixed | team |
Spec of the System.nanoTime:
"To compare two nanoTime values
long t0 = System.nanoTime();
...
long t1 = System.nanoTime();
one should use t1 - t0 < 0, not t1 < t0, because of the possibility of numerical overflow."
Looks like "t1 - t0 < 0, not t1 < t0" would be better to replace with "t0 - t1 < 0, not t0 < t1", because t0 is less then t1.
"To compare two nanoTime values
long t0 = System.nanoTime();
...
long t1 = System.nanoTime();
one should use t1 - t0 < 0, not t1 < t0, because of the possibility of numerical overflow."
Looks like "t1 - t0 < 0, not t1 < t0" would be better to replace with "t0 - t1 < 0, not t0 < t1", because t0 is less then t1.
- backported by
-
JDK-8084448 (spec) Defect in the System.nanoTime spec
-
- Resolved
-