ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/TimeUnit.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/TimeUnit.java (file contents):
Revision 1.38 by jsr166, Tue Mar 15 19:47:03 2011 UTC vs.
Revision 1.39 by jsr166, Thu Jun 9 07:48:43 2011 UTC

# Line 23 | Line 23 | package java.util.concurrent;
23   * the following code will timeout in 50 milliseconds if the {@link
24   * java.util.concurrent.locks.Lock lock} is not available:
25   *
26 < * <pre>  Lock lock = ...;
27 < *  if (lock.tryLock(50L, TimeUnit.MILLISECONDS)) ...
28 < * </pre>
26 > *  <pre> {@code
27 > * Lock lock = ...;
28 > * if (lock.tryLock(50L, TimeUnit.MILLISECONDS)) ...}</pre>
29 > *
30   * while this code will timeout in 50 seconds:
31 < * <pre>
32 < *  Lock lock = ...;
33 < *  if (lock.tryLock(50L, TimeUnit.SECONDS)) ...
33 < * </pre>
31 > *  <pre> {@code
32 > * Lock lock = ...;
33 > * if (lock.tryLock(50L, TimeUnit.SECONDS)) ...}</pre>
34   *
35   * Note however, that there is no guarantee that a particular timeout
36   * implementation will be able to notice the passage of time at the

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines