AE-AdHoc

 view release on metacpan or  search on metacpan

t/19-soft-timeout.t  view on Meta::CPAN

#!/usr/bin/perl -w

use strict;
use Test::More tests => 2;
use Test::Exception;

use AE::AdHoc;

lives_ok {
	ae_recv { } soft_timeout => 0.1
} "soft timeout";

throws_ok {
	ae_recv { } timeout => 0.1
} qr(Timeout.*seconds), "hard timeout in options";

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 6.071 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-d29e8ade9f55 )