Commit 24a56d38 authored by Steven Walters's avatar Steven Walters Committed by Fiona Glaser

Fix fps reporting on mingw64

_ftime on mingw64 uses __timeb32 which is broken.
Use ftime instead.
parent 30085672
......@@ -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
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment