From 49e2d55b5834318a4e370dde8829b2e991752bc7 Mon Sep 17 00:00:00 2001 From: Steven Walters Date: Sat, 30 Oct 2010 16:51:01 -0400 Subject: [PATCH] Fix fps reporting on mingw64 _ftime on mingw64 uses __timeb32 which is broken. Use ftime instead. --- common/mdate.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 } -- 2.47.3