X-Git-Url: https://git.ao2.it/libam7xxx.git/blobdiff_plain/2aaeac65529d1bd4a030c3c15728143c66b141dd..bf64f1248765470b023d49e311cdcfc4b7b4fc7a:/src/tools.c diff --git a/src/tools.c b/src/tools.c index be63ac6..b9c85e1 100644 --- a/src/tools.c +++ b/src/tools.c @@ -1,6 +1,6 @@ /* am7xxx - communication with AM7xxx based USB Pico Projectors and DPFs * - * Copyright (C) 2014 Antonio Ospite + * Copyright (C) 2014-2018 Antonio Ospite * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,8 +16,12 @@ * along with this program. If not, see . */ +#ifdef _WIN32 +#include +#else #include #include +#endif #include "tools.h" @@ -30,6 +34,9 @@ */ int msleep(unsigned long msecs) { +#ifdef _WIN32 + Sleep(msecs); +#else struct timespec delay; int ret; @@ -43,6 +50,7 @@ int msleep(unsigned long msecs) } if (ret == -1) return ret; +#endif return 0; }