Provide usleep() for Windows.
This commit is contained in:
parent
930bf74fbe
commit
e2e6ec8050
2 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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__ */
|
||||
|
|
Loading…
Reference in a new issue