]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/cmd_ipc.t
tests: replace select/usleep calls with tick()
[public-inbox.git] / t / cmd_ipc.t
index 75697a1539e3e8b2b80bb4d1cfa80d685e7d57d5..cd76d5e896d160a015e19a9f9e119bfa0ffaa188 100644 (file)
@@ -10,7 +10,6 @@ pipe(my ($r, $w)) or BAIL_OUT;
 my ($send, $recv);
 require_ok 'PublicInbox::Spawn';
 my $SOCK_SEQPACKET = eval { Socket::SOCK_SEQPACKET() } // undef;
-use Time::HiRes qw(usleep);
 
 my $do_test = sub { SKIP: {
        my ($type, $flag, $desc) = @_;
@@ -61,7 +60,7 @@ my $do_test = sub { SKIP: {
                        if ($pid == 0) {
                                # need to loop since Perl signals are racy
                                # (the interpreter doesn't self-pipe)
-                               while (usleep(1000)) {
+                               while (tick(0.01)) {
                                        kill 'ALRM', $tgt;
                                }
                        }