[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [OSSTEST PATCH 7/7] pdu-snmp: Fix sleeping
sleep takes only an integer. We have to use select to sleep for fractions of a second. Signed-off-by: Ian Jackson <iwj@xxxxxxxxxxxxxx> --- pdu-snmp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdu-snmp b/pdu-snmp index 61380766..79d22e1f 100755 --- a/pdu-snmp +++ b/pdu-snmp @@ -172,7 +172,7 @@ if (!defined $action) { my $retries = 0; for (;;) { set($valset); - sleep $retries * 0.1; + select undef,undef,undef, $retries * 0.1; print "now: "; my $got = show(); if ($got eq $map[$valset]) { last; } if ($map[$valset] !~ m{^(?:off|on)$}) { -- 2.20.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |