#endif
#ifndef HAVE_USLEEP
-int usleep(long usec) {
+int usleep(long long usec) {
struct timeval tv = {usec / 1000000, (usec / 1000) % 1000};
select(0, NULL, NULL, NULL, &tv);
return 0;
extern int gettimeofday(struct timeval *, void *);
#endif
+#ifndef HAVE_USLEEP
+extern void usleep(long long usec);
+#endif
+
#endif /* __DROPIN_H__ */
if(contradicting_del_edge > 100 && contradicting_add_edge > 100) {
logger(LOG_WARNING, "Possible node with same Name as us! Sleeping %d seconds.", sleeptime);
- sleep(sleeptime);
+ usleep(sleeptime * 1000000LL);
sleeptime *= 2;
if(sleeptime < 0)
sleeptime = 3600;