mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-30 22:17:13 +08:00
Move av_gettime() back to lavf/utils.c
Originally committed as revision 9706 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user