# io.github.libtmux.Server.Server.within

- **Module:** io.github.libtmux.Server.Server
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/842228310449e879ebcaa3f910597757c9dbffd6/libtmux/src/main/java/io/github/libtmux/Server.java#L820
- **Page:** https://libtmux.org/en/java/latest/reference/io-github-libtmux-server-server-within/

```
io.github.libtmux.Server.Server.within(timeout: Duration) -> Server
```

This server, with every command bounded by a deadline of the caller's choosing.

The per-call deadline. Every read and change made through the result, and through every
handle taken from it, gives tmux this long rather than the server's default:

Shares this server's transport, so it has the same identity and its handles compare equal
to this server's; closing it releases nothing. {@link #toBuilder} is not how to spell this: a
server that owns its transport hands a derived server a transport of its own, which a caller
bounding many calls would multiply.

## Raises

- `IllegalArgumentException`: if the timeout is not positive

## Example

```java
List<String> screen = server.within(Duration.ofMillis(500)).panes().get(0).capture();
```
