All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Jackson <iwj@xenproject.org>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <iwj@xenproject.org>
Subject: [OSSTEST PATCH 7/7] pdu-snmp: Fix sleeping
Date: Tue, 27 Oct 2020 13:43:54 +0000	[thread overview]
Message-ID: <20201027134354.25561-8-iwj@xenproject.org> (raw)
In-Reply-To: <20201027134354.25561-1-iwj@xenproject.org>

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

Signed-off-by: Ian Jackson <iwj@xenproject.org>
---
 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



      parent reply	other threads:[~2020-10-27 13:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27 13:43 [OSSTEST PATCH 0/7] Prepare for ServerTech PDUs Ian Jackson
2020-10-27 13:43 ` [OSSTEST PATCH 1/7] README: Fix a typo Ian Jackson
2020-10-27 13:43 ` [OSSTEST PATCH 2/7] pdu-snmp: Rename from pdu-msw Ian Jackson
2020-10-27 13:43 ` [OSSTEST PATCH 3/7] pdu-snmp: Centralise base OIDs Ian Jackson
2020-10-27 13:43 ` [OSSTEST PATCH 4/7] pdu-snmp: Refactor model handling Ian Jackson
2020-10-27 13:43 ` [OSSTEST PATCH 5/7] pdu-snmp: Support ServerTech PDUs "Pro 1/2" aka "Sentry4" Ian Jackson
2020-10-27 13:43 ` [OSSTEST PATCH 6/7] PDU::snmp, PDU::msw: Rename from msw to snmp Ian Jackson
2020-10-27 13:43 ` Ian Jackson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201027134354.25561-8-iwj@xenproject.org \
    --to=iwj@xenproject.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.