public static void waitfor(FullWait fw, int val, long limit) throws InterruptedException { System.out.println("about to waitUntilAtLeast(" + val + ", " + limit + ") ... "); long startTime = System.currentTimeMillis(); boolean retVal = fw.waitUntilAtLeast(val, limit); long endTime = System.currentTimeMillis(); System.out.println( "waited for " + (endTime - startTime) + " ms, retVal=" + retVal + "\n---------------"); }