Commit cf00dd2e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

VTIM usage polish

parent a3ff9258
......@@ -228,7 +228,6 @@ Lck_CondWaitUntil(pthread_cond_t *cond, struct lock *lck, vtim_real when)
{
struct ilck *ilck;
struct timespec ts;
vtim_real t;
AN(lck);
CAST_OBJ_NOTNULL(ilck, lck->priv, ILCK_MAGIC);
......@@ -240,8 +239,7 @@ Lck_CondWaitUntil(pthread_cond_t *cond, struct lock *lck, vtim_real when)
AZ(errno);
} else {
assert(when > 1e9);
ts.tv_nsec = (long)(modf(when, &t) * 1e9);
ts.tv_sec = (long)t;
ts = VTIM_timespec(when);
assert(ts.tv_nsec >= 0 && ts.tv_nsec <= 999999999);
errno = pthread_cond_timedwait(cond, &ilck->mtx, &ts);
#if defined (__APPLE__)
......
......@@ -39,7 +39,6 @@
#include "http2/cache_http2.h"
#include "vend.h"
#include "vtim.h"
#include "vtcp.h"
static const char h2_resp_101[] =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment