#include <config.h>
#endif
+#include <math.h>
#include <stdio.h>
#include <assert.h>
IOCHAN p, *nextp;
fd_set in, out, except;
int res, max;
- static struct timeval nullto = {0, 0}, to;
+ static struct timeval to;
struct timeval *timeout;
FD_ZERO(&in);
event_loop(man, &man->channel_list);
}
+void pazpar2_sleep(double d)
+{
+#ifdef WIN32
+ Sleep( (DWORD) (d * 1000));
+#else
+ struct timeval tv;
+ tv.tv_sec = floor(d);
+ tv.tv_usec = (d - floor(d)) * 1000000;
+ select(0, 0, 0, 0, &tv);
+#endif
+}
+
/*
* Local variables:
* c-basic-offset: 4
IOCHAN iochan_create(int fd, IOC_CALLBACK cb, int flags, const char *name);
+void pazpar2_sleep(double d);
+
#endif
/*
* Local variables: