summaryrefslogtreecommitdiff
path: root/regress/sys/kern/splice/funcs.pl
diff options
context:
space:
mode:
Diffstat (limited to 'regress/sys/kern/splice/funcs.pl')
-rw-r--r--regress/sys/kern/splice/funcs.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/regress/sys/kern/splice/funcs.pl b/regress/sys/kern/splice/funcs.pl
index d0342fd8f6f..88501e177ae 100644
--- a/regress/sys/kern/splice/funcs.pl
+++ b/regress/sys/kern/splice/funcs.pl
@@ -1,4 +1,4 @@
-# $OpenBSD: funcs.pl,v 1.6 2011/07/04 05:43:02 bluhm Exp $
+# $OpenBSD: funcs.pl,v 1.7 2011/08/21 22:50:59 bluhm Exp $
# Copyright (c) 2010,2011 Alexander Bluhm <bluhm@openbsd.org>
#
@@ -31,6 +31,7 @@ use BSD::Socket::Splice qw(setsplice getsplice geterror);
sub write_char {
my $self = shift;
my $len = shift // $self->{len} // 251;
+ my $sleep = $self->{sleep};
my $ctx = Digest::MD5->new();
my $char = '0';
@@ -45,6 +46,10 @@ sub write_char {
when(/\n/) { print STDERR "."; $char = '0' }
default { $char++ }
}
+ if ($self->{sleep}) {
+ IO::Handle::flush(\*STDOUT);
+ sleep $self->{sleep};
+ }
}
if ($len) {
$char = "\n";