X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=util.c;h=3016e23d9add324b2e91229601db9af35785210f;hb=ac968003c13bde5c86ffa19f8819e436b5bc03e6;hp=0d75adfa88939dfcb2edc7f07c53ebaace3d24b5;hpb=a0f731f21d6aa26dbf7246039a1c66c2ade0533f;p=polyglot.git diff --git a/util.c b/util.c index 0d75adf..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" @@ -187,8 +189,8 @@ void my_fatal(const char format[], ...) { CONSTRUCT_ARG_STRING(format,string); - fprintf(stderr,format,string); - if (LogFile != NULL) fprintf(LogFile,format,&string); + fprintf(stderr,"%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 }