]> granicus.if.org Git - curl/commitdiff
Andres Garcia made it build and run on windows
authorDaniel Stenberg <daniel@haxx.se>
Mon, 5 Nov 2007 10:07:34 +0000 (10:07 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 5 Nov 2007 10:07:34 +0000 (10:07 +0000)
docs/examples/10-at-a-time.c

index 29c7f08d96b9ae736e447fad80cc2bf3b5ae537e..99a031103dcb01d0e1ed5c6867beb2dbf3d7bef0 100644 (file)
@@ -18,6 +18,9 @@
 #include <string.h>
 #include <unistd.h>
 #include <curl/multi.h>
+#ifdef WIN32
+#include <windows.h>
+#endif
 
 static const char *urls[] = {
   "http://www.microsoft.com",
@@ -138,7 +141,11 @@ int main(void)
         L = 100;
 
       if (M == -1) {
+#ifdef WIN32
+        Sleep(L);
+#else
         sleep(L / 1000);
+#endif
       } else {
         T.tv_sec = L/1000;
         T.tv_usec = (L%1000)*1000;