Returns whether this has deadline expired. @return true if it has, otherwise false.
()
| 120 | * @return {@code true} if it has, otherwise {@code false}. |
| 121 | */ |
| 122 | public boolean isExpired() { |
| 123 | if (!expired) { |
| 124 | if (deadlineNanos - ticker.nanoTime() <= 0) { |
| 125 | expired = true; |
| 126 | } else { |
| 127 | return false; |
| 128 | } |
| 129 | } |
| 130 | return true; |
| 131 | } |
| 132 | |
| 133 | /** |
| 134 | * Is {@code this} deadline before another. Two deadlines must be created using the same {@link |