ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/loops/TimeUnitLoops.java
(Generate patch)

Comparing jsr166/src/test/loops/TimeUnitLoops.java (file contents):
Revision 1.1 by dl, Mon May 2 19:19:38 2005 UTC vs.
Revision 1.5 by jsr166, Wed Dec 31 16:44:01 2014 UTC

# Line 1 | Line 1
1 + /*
2 + * Written by Doug Lea with assistance from members of JCP JSR-166
3 + * Expert Group and released to the public domain, as explained at
4 + * http://creativecommons.org/publicdomain/zero/1.0/
5 + */
6   import java.util.concurrent.*;
2 import java.util.Random;
7  
8   public class TimeUnitLoops {
9  
# Line 37 | Line 41 | public class TimeUnitLoops {
41          long sum = 0;
42          int x = rng.next();
43          for (int i = 0; i < 1000000; ++i) {
44 <            long l = (long)x + (long)x;
44 >            long l = (long) x + (long) x;
45              sum += cvt(l, TimeUnit.SECONDS);
46              sum += TimeUnit.MILLISECONDS.toMicros(l+2);
47              sum += cvt(l+17, TimeUnit.NANOSECONDS);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines