X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=util.c;h=3016e23d9add324b2e91229601db9af35785210f;hb=a8209ad25e331b9938321744c3cf0e03867eac1c;hp=5e6e4f3a57ac913d67ab4fa7b649c125ea50a1eb;hpb=1087eb7b2d8447adf9a7deb549d4004a87b46b10;p=polyglot.git diff --git a/util.c b/util.c index 5e6e4f3..3016e23 100644 --- a/util.c +++ b/util.c @@ -18,7 +18,9 @@ #include #include #include +#ifndef _MSC_VER #include +#endif #include "main.h" #include "util.h" @@ -188,7 +190,7 @@ void my_fatal(const char format[], ...) { CONSTRUCT_ARG_STRING(format,string); fprintf(stderr,"%s",string); - if (LogFile != NULL) fprintf(LogFile,"%s",string); + my_log("POLYGLOT %s",string); if (Error) { // recursive error my_log("POLYGLOT *** RECURSIVE ERROR ***\n"); @@ -337,7 +339,10 @@ double now_real() { return tv->tv_sec + tv->tv_usec * 1E-6; #else - return (double) GetTickCount() / 1000.0; // we can do better here:-) + struct _timeb timeptr; + _ftime(&timeptr); + return(timeptr.time+((double)timeptr.millitm)/1000.0); +// return (double) GetTickCount() / 1000.0; // we can do better here:-) #endif }