diff --git a/c-programming/io/freadln.c b/c-programming/io/freadln.c index d5bb2cb..6f7c867 100644 --- a/c-programming/io/freadln.c +++ b/c-programming/io/freadln.c @@ -78,14 +78,14 @@ int freadln(FILE* f, char** output, size_t* length_out) { #ifdef TEST # if defined(_WIN32) || defined(WIN32) # include -# define SLEEP_FN Sleep +# define SLEEP_FN(x) Sleep((DWORD) x) # define DO_SLEEP 1 # elif defined(__CYGWIN__) || defined(__unix__) || defined(__APPLE__) && \ defined(__MACH__) || defined(__linux__) || defined(__FreeBSD__) || \ defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || \ defined(__DragonFly__) || defined(__MINGW32__) || defined(__MINGW64__) # include -# define SLEEP_FN usleep +# define SLEEP_FN(x) usleep((x) * 1000ULL) # define DO_SLEEP 1 # else # define SLEEP_FN(...)