2
0

sleep.c 302 B

123456789101112131415161718192021
  1. #ifdef WIN32
  2. #include <windows.h>
  3. #include <process.h>
  4. #else
  5. #include <unistd.h>
  6. #endif
  7. #include "bool.h"
  8. #include "xmlrpc-c/sleep_int.h"
  9. void
  10. xmlrpc_millisecond_sleep(unsigned int const milliseconds) {
  11. #ifdef WIN32
  12. SleepEx(milliseconds, true);
  13. #else
  14. usleep(milliseconds * 1000);
  15. #endif
  16. }