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

Comparing jsr166/src/test/tck/JSR166TestCase.java (file contents):
Revision 1.37 by dl, Tue Aug 4 00:23:18 2009 UTC vs.
Revision 1.38 by jsr166, Wed Aug 5 00:43:59 2009 UTC

# Line 395 | Line 395 | public class JSR166TestCase extends Test
395          public void refresh() {}
396      }
397  
398 +    /**
399 +     * Sleep until the timeout has elapsed, or interrupted.
400 +     * Does <em>NOT</em> throw InterruptedException.
401 +     */
402 +    void sleepTillInterrupted(long timeoutMillis) {
403 +        try {
404 +            Thread.sleep(timeoutMillis);
405 +        } catch (InterruptedException wakeup) {
406 +        }
407 +    }
408 +
409 +    /**
410 +     * Returns a new started Thread running the given runnable.
411 +     */
412 +    Thread newStartedThread(Runnable runnable) {
413 +        Thread t = new Thread(runnable);
414 +        t.start();
415 +        return t;
416 +    }
417  
418      // Some convenient Runnable classes
419  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines