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.198 by jsr166, Wed Jul 27 17:16:23 2016 UTC vs.
Revision 1.199 by jsr166, Sat Aug 6 16:24:05 2016 UTC

# Line 1251 | Line 1251 | public class JSR166TestCase extends Test
1251       * thread to enter a wait state: BLOCKED, WAITING, or TIMED_WAITING.
1252       */
1253      void waitForThreadToEnterWaitState(Thread thread, long timeoutMillis) {
1254 <        long startTime = System.nanoTime();
1254 >        long startTime = 0L;
1255          for (;;) {
1256              Thread.State s = thread.getState();
1257              if (s == Thread.State.BLOCKED ||
# Line 1260 | Line 1260 | public class JSR166TestCase extends Test
1260                  return;
1261              else if (s == Thread.State.TERMINATED)
1262                  fail("Unexpected thread termination");
1263 +            else if (startTime == 0L)
1264 +                startTime = System.nanoTime();
1265              else if (millisElapsedSince(startTime) > timeoutMillis) {
1266                  threadAssertTrue(thread.isAlive());
1267                  return;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines