From: Steven Walters Date: Sat, 30 Oct 2010 20:51:01 +0000 (-0400) Subject: Fix fps reporting on mingw64 X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=49e2d55b5834318a4e370dde8829b2e991752bc7;p=x264.git Fix fps reporting on mingw64 _ftime on mingw64 uses __timeb32 which is broken. Use ftime instead. --- diff --git a/common/mdate.c b/common/mdate.c index aaba97ac..702d4474 100644 --- a/common/mdate.c +++ b/common/mdate.c @@ -39,11 +39,11 @@ int64_t x264_mdate( void ) #ifndef __MINGW32__ struct timeval tv_date; gettimeofday( &tv_date, NULL ); - return( (int64_t) tv_date.tv_sec * 1000000 + (int64_t) tv_date.tv_usec ); + return (int64_t)tv_date.tv_sec * 1000000 + (int64_t)tv_date.tv_usec; #else - struct _timeb tb; - _ftime(&tb); - return ((int64_t)tb.time * (1000) + (int64_t)tb.millitm) * (1000); + struct timeb tb; + ftime( &tb ); + return ((int64_t)tb.time * 1000 + (int64_t)tb.millitm) * 1000; #endif }