# io.github.libtmux.snapshot.ServerMirror.awaitNewer

- **Module:** io.github.libtmux.snapshot
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/f56392b5d9bc7f1f9c1631842333fb90f3d82d40/libtmux/src/main/java/io/github/libtmux/snapshot/ServerMirror.java#L138
- **Page:** https://libtmux.org/en/java/latest/reference/io-github-libtmux-snapshot-servermirror-servermirror-awaitnewer/

```
io.github.libtmux.snapshot.ServerMirror.awaitNewer(epoch: long, timeout: Duration) -> Optional<View>
```

Waits for a view newer than {@code epoch}.

## Returns

the newer view, or empty when {@code timeout} passed first or the mirror ended; {@link #isEnded()} and {@link #cause()} tell those apart

## Raises

- [`InterruptedException`](https://docs.oracle.com/en/java/javase/21/docs/api/java/lang/InterruptedException.html): if the waiting thread is interrupted
