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";



( run in 0.230 second using v1.01-cache-2.11-cpan-a5abf4f5562 )