diff options
author | Ben Pfaff <blp@nicira.com> | 2010-05-12 12:53:07 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-05-26 11:46:59 -0700 |
commit | 7cf8b2660f9813fe080a3f4fcc975099cb36417a (patch) | |
tree | e508a0001469854f18e185c7b93b79af06c9906d /lib/rconn.c | |
parent | 8bf4bbe390af3f370e7e95d9237572ff750047a8 (diff) | |
download | openvswitch-7cf8b2660f9813fe080a3f4fcc975099cb36417a.tar.gz |
poll-loop: New function poll_timer_wait_until().
Many of poll_timer_wait()'s callers actually want to wait until a specific
time, so it's convenient for them to offer a function that does this.
Diffstat (limited to 'lib/rconn.c')
-rw-r--r-- | lib/rconn.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/rconn.c b/lib/rconn.c index ea45134fe..71198ea76 100644 --- a/lib/rconn.c +++ b/lib/rconn.c @@ -500,9 +500,8 @@ rconn_run_wait(struct rconn *rc) timeo = timeout(rc); if (timeo != UINT_MAX) { - unsigned int expires = sat_add(rc->state_entered, timeo); - unsigned int remaining = sat_sub(expires, time_now()); - poll_timer_wait(sat_mul(remaining, 1000)); + long long int expires = sat_add(rc->state_entered, timeo); + poll_timer_wait_until(expires * 1000); } if ((rc->state & (S_ACTIVE | S_IDLE)) && rc->txq.n) { |