iowatcher

timeout

my $timeout = $stream->timeout;
$stream = $stream->timeout(45);

Maximum amount of time in seconds stream can be inactive before getting closed automatically, defaults to 15. Setting the value to 0 will allow this stream to be inactive indefinitely. Note that this attribute is EXPERIMENTAL and might change without warning!