git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3260
d4fa192b-c00b-0410-8231-
f00ffab90ce4
"Connection: close\r\n"
"\r\n";
-static void
-dsleep(double t)
-{
- if (t > 100.0)
- (void)sleep((int)round(t));
- else
- (void)usleep((int)round(t * 1e6));
-}
-
/*--------------------------------------------------------------------
* Poke one backend, once, but possibly at both IPv4 and IPv6 addresses.
*
vt->last, vt->avg, vt->resp_buf);
if (!vt->stop)
- dsleep(vt->probe.interval);
+ TIM_sleep(vt->probe.interval);
}
return (NULL);
}
time_t TIM_parse(const char *p);
double TIM_mono(void);
double TIM_real(void);
+void TIM_sleep(double t);
/* from libvarnish/version.c */
void varnish_version(const char *);
#include <stdio.h>
#include <string.h>
#include <time.h>
+#include <unistd.h>
+#include <math.h>
#include "config.h"
#include "libvarnish.h"
return (0);
}
+void
+TIM_sleep(double t)
+{
+ if (t > 100.0)
+ (void)sleep((int)round(t));
+ else
+ (void)usleep((int)round(t * 1e6));
+}
+
+
#ifdef TEST_DRIVER
#include <stdlib.h>