don't call usleep when the delays are zero

This commit is contained in:
Mariano Alvira 2011-05-06 12:13:34 -04:00
parent a3412a0b81
commit 942590a840

View file

@ -127,8 +127,8 @@ while(1) {
my $i = 1;
while(read(FILE, $c, 1)) {
$i++;
usleep($first_delay) if ( $s == 0 );
usleep($second_delay) if ( $s == 1 );
usleep($first_delay) if ( $s == 0 ) && ($first_delay != 0);
usleep($second_delay) if ( $s == 1 ) && ($second_delay != 0);
$ob->write($c);
}
}