diff options
author | Olivier Langlois <olivier@trillion01.com> | 2014-05-06 17:16:49 -0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-17 15:51:49 +0200 |
commit | b052bccbe4b5533c3f11fddb14df59fb72dbf463 (patch) | |
tree | afe015f1ab22ce40799862b1a6b299af40e08797 /libavcodec/motion-test.c | |
parent | 0eec06ed8747923faa6a98e474f224d922dc487d (diff) | |
download | ffmpeg-b052bccbe4b5533c3f11fddb14df59fb72dbf463.tar.gz |
lavc: Use av_gettime_relative()
Whenever av_gettime() is used to measure relative period of time,
av_gettime_relative() is prefered as it guarantee monotonic time
on supported platforms.
Signed-off-by: Olivier Langlois <olivier@trillion01.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/motion-test.c')
-rw-r--r-- | libavcodec/motion-test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/motion-test.c b/libavcodec/motion-test.c index 53cfedbe76..38616012ca 100644 --- a/libavcodec/motion-test.c +++ b/libavcodec/motion-test.c @@ -91,7 +91,7 @@ static void test_motion(const char *name, emms_c(); /* speed test */ - ti = av_gettime(); + ti = av_gettime_relative(); d1 = 0; for(it=0;it<NB_ITS;it++) { for(y=0;y<HEIGHT-17;y++) { @@ -103,7 +103,7 @@ static void test_motion(const char *name, } emms_c(); dummy = d1; /* avoid optimization */ - ti = av_gettime() - ti; + ti = av_gettime_relative() - ti; printf(" %0.0f kop/s\n", (double)NB_ITS * (WIDTH - 16) * (HEIGHT - 16) / |