cancel timer.
()
| 165 | */ |
| 166 | |
| 167 | @Override |
| 168 | public void close() throws InterruptedException { |
| 169 | if (this.task.isActive()) { |
| 170 | this.task.setActive(false); |
| 171 | this.task.interrupt(); |
| 172 | this.task.join(); |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | /** |
| 177 | * is timer waiting. Used in timer simulation. |