X-Git-Url: http://winboard.nl/cgi-bin?p=polyglot.git;a=blobdiff_plain;f=util.c;fp=util.c;h=06f868d163fec3891fb2412bc970036d0c6d5c53;hp=a3fb3ba779f247ff1efc9a88be4bce67a1f75aef;hb=683b5dc504dc5d930b617cfba09011e41e51dd16;hpb=471c4c42e267be298ce20951d5a352acd6b55190 diff --git a/util.c b/util.c index a3fb3ba..06f868d 100644 --- a/util.c +++ b/util.c @@ -514,3 +514,13 @@ void my_quote(char *out, const char *in, const char *special){ } +void my_sleep(int msec){ +#ifndef _WIN32 + struct timespec tm; + tm.tv_sec=msec/1000; + tm.tv_nsec=1000000*(msec%1000); + nanosleep(&tm,NULL); +#else + Sleep(msec); +#endif +}