sleep takes only an integer.  We have to use select to sleep for
fractions of a second.

Signed-off-by: Ian Jackson <[email protected]>
---
 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


Reply via email to