--- jsr166/src/test/loops/TimeoutLockLoops.java 2009/10/29 23:09:08 1.4 +++ jsr166/src/test/loops/TimeoutLockLoops.java 2015/01/15 18:34:19 1.9 @@ -1,12 +1,11 @@ /* * Written by Doug Lea with assistance from members of JCP JSR-166 * Expert Group and released to the public domain, as explained at - * http://creativecommons.org/licenses/publicdomain + * http://creativecommons.org/publicdomain/zero/1.0/ */ /* * @test * @bug 4486658 - * @compile -source 1.5 TimeoutLockLoops.java * @run main TimeoutLockLoops * @summary Checks for responsiveness of locks to timeouts. * Runs under the assumption that ITERS computations require more than @@ -14,9 +13,9 @@ * another decade. */ +import java.util.*; import java.util.concurrent.*; import java.util.concurrent.locks.*; -import java.util.*; public final class TimeoutLockLoops { static final ExecutorService pool = Executors.newCachedThreadPool(); @@ -66,7 +65,7 @@ public final class TimeoutLockLoops { barrier.await(); if (print) { long time = timer.getTime(); - double secs = (double)(time) / 1000000000.0; + double secs = (double) time / 1000000000.0; System.out.println("\t " + secs + "s run time"); } @@ -110,6 +109,4 @@ public final class TimeoutLockLoops { } } } - - }