X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=util.c;h=c2dec6b29e1b51a3b16bb04f8c31e541979d7993;hb=de010509fa0e57ba955da6512c714fbff8606af3;hp=a3fb3ba779f247ff1efc9a88be4bce67a1f75aef;hpb=471c4c42e267be298ce20951d5a352acd6b55190;p=polyglot.git diff --git a/util.c b/util.c index a3fb3ba..c2dec6b 100644 --- a/util.c +++ b/util.c @@ -202,7 +202,7 @@ void my_fatal(const char format[], ...) { // This should be gui_send but this does not work. // Why? - fprintf(stderr,"tellusererror POLYGLOT: %s",string); + printf("tellusererror POLYGLOT: %s",string); if (Error) { // recursive error my_log("POLYGLOT *** RECURSIVE ERROR ***\n"); @@ -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 +}