Commit 82e4ac2c authored by Ramiro Polla's avatar Ramiro Polla

Move av_gettime() back to lavf/utils.c

Originally committed as revision 9706 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent c993a831
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#endif #endif
#include <sys/time.h>
#include <time.h>
#ifndef HAVE_SYS_POLL_H #ifndef HAVE_SYS_POLL_H
#if defined(__MINGW32__) #if defined(__MINGW32__)
...@@ -36,16 +34,6 @@ ...@@ -36,16 +34,6 @@
#endif #endif
#endif #endif
/**
* gets the current time in micro seconds.
*/
int64_t av_gettime(void)
{
struct timeval tv;
gettimeofday(&tv,NULL);
return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
}
#ifdef CONFIG_NETWORK #ifdef CONFIG_NETWORK
#include "network.h" #include "network.h"
......
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#include "opt.h" #include "opt.h"
#include "avstring.h" #include "avstring.h"
#include "riff.h" #include "riff.h"
#include <sys/time.h>
#include <time.h>
#undef NDEBUG #undef NDEBUG
#include <assert.h> #include <assert.h>
...@@ -2498,6 +2500,16 @@ int parse_frame_rate(int *frame_rate_num, int *frame_rate_den, const char *arg) ...@@ -2498,6 +2500,16 @@ int parse_frame_rate(int *frame_rate_num, int *frame_rate_den, const char *arg)
return ret; return ret;
} }
/**
* gets the current time in micro seconds.
*/
int64_t av_gettime(void)
{
struct timeval tv;
gettimeofday(&tv,NULL);
return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec;
}
int64_t parse_date(const char *datestr, int duration) int64_t parse_date(const char *datestr, int duration)
{ {
const char *p; const char *p;
......
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