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.4 by jsr166, Tue Mar 15 19:47:06 2011 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.*;
7   import java.util.Random;
8  
# Line 37 | Line 42 | public class TimeUnitLoops {
42          long sum = 0;
43          int x = rng.next();
44          for (int i = 0; i < 1000000; ++i) {
45 <            long l = (long)x + (long)x;
45 >            long l = (long) x + (long) x;
46              sum += cvt(l, TimeUnit.SECONDS);
47              sum += TimeUnit.MILLISECONDS.toMicros(l+2);
48              sum += cvt(l+17, TimeUnit.NANOSECONDS);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines