summaryrefslogtreecommitdiff
path: root/libavformat/os_support.c
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2007-07-16 20:27:16 +0000
committerRamiro Polla <ramiro.polla@gmail.com>2007-07-16 20:27:16 +0000
commitc993a831312cd4b6892eff88292f806d93ed4b66 (patch)
tree4d8aad98606c8b5b062a0692372f88711ab57078 /libavformat/os_support.c
parentfc69cc615e74bd0ff322c315a0c7f7809024ee2b (diff)
MinGW has gettimeofday() since mingw-runtime-3.10
Originally committed as revision 9705 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/os_support.c')
-rw-r--r--libavformat/os_support.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/libavformat/os_support.c b/libavformat/os_support.c
index 947679a143..23fc922e84 100644
--- a/libavformat/os_support.c
+++ b/libavformat/os_support.c
@@ -21,14 +21,11 @@
*/
#include "config.h"
#include "avformat.h"
-#if defined(__MINGW32__)
-#include <sys/types.h>
-#include <sys/timeb.h>
-#else
+#if !defined(__MINGW32__)
#include <unistd.h>
#include <fcntl.h>
-#include <sys/time.h>
#endif
+#include <sys/time.h>
#include <time.h>
#ifndef HAVE_SYS_POLL_H
@@ -44,15 +41,9 @@
*/
int64_t av_gettime(void)
{
-#if defined(__MINGW32__)
- struct timeb tb;
- _ftime(&tb);
- return ((int64_t)tb.time * INT64_C(1000) + (int64_t)tb.millitm) * INT64_C(1000);
-#else
struct timeval tv;
gettimeofday(&tv,NULL);
return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
-#endif
}
#ifdef CONFIG_NETWORK