Provide usleep() for Windows.

This commit is contained in:
Guus Sliepen 2010-11-13 15:50:39 +01:00
parent 930bf74fbe
commit e2e6ec8050
2 changed files with 11 additions and 0 deletions

View file

@ -163,3 +163,10 @@ int gettimeofday(struct timeval *tv, void *tz) {
return 0;
}
#endif
#ifdef HAVE_MINGW
int usleep(long usec) {
Sleep(usec / 1000);
return 0;
}
#endif

View file

@ -41,4 +41,8 @@ extern int vasprintf(char **, const char *, va_list ap);
extern int gettimeofday(struct timeval *, void *);
#endif
#ifdef HAVE_MINGW
extern int usleep(long);
#endif
#endif /* __DROPIN_H__ */