aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2007-07-16 20:28:43 +0000
committerRamiro Polla <ramiro.polla@gmail.com>2007-07-16 20:28:43 +0000
commit82e4ac2c97a1ed1e89f54b33dba502d5baaa61ab (patch)
tree7607616f051e15513951898d2d5eb64249e2572a /libavformat/utils.c
parentc993a831312cd4b6892eff88292f806d93ed4b66 (diff)
downloadffmpeg-82e4ac2c97a1ed1e89f54b33dba502d5baaa61ab.tar.gz
Move av_gettime() back to lavf/utils.c
Originally committed as revision 9706 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 401e828790..5b054f6570 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -23,6 +23,8 @@
#include "opt.h"
#include "avstring.h"
#include "riff.h"
+#include <sys/time.h>
+#include <time.h>
#undef NDEBUG
#include <assert.h>
@@ -2498,6 +2500,16 @@ int parse_frame_rate(int *frame_rate_num, int *frame_rate_den, const char *arg)
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)
{
const char *p;