diff options
author | Mans Rullgard <mans@mansr.com> | 2012-06-20 01:34:38 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-06-20 17:09:03 +0100 |
commit | 980f81d961e62dd38b9dbe6091e72638d6535ccd (patch) | |
tree | 1332a4e218a48c11998fd7e44a070d47e88e6961 /libavcodec/fft-test.c | |
parent | ae0a301668da542eaf8855e5dd61d0728181b0dd (diff) | |
download | ffmpeg-980f81d961e62dd38b9dbe6091e72638d6535ccd.tar.gz |
Use av_gettime() in various places
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/fft-test.c')
-rw-r--r-- | libavcodec/fft-test.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/libavcodec/fft-test.c b/libavcodec/fft-test.c index 70c0655ad0..75941a1071 100644 --- a/libavcodec/fft-test.c +++ b/libavcodec/fft-test.c @@ -27,6 +27,7 @@ #include "libavutil/mathematics.h" #include "libavutil/lfg.h" #include "libavutil/log.h" +#include "libavutil/time.h" #include "fft.h" #if CONFIG_FFT_FLOAT #include "dct.h" @@ -34,7 +35,6 @@ #endif #include <math.h> #include <unistd.h> -#include <sys/time.h> #include <stdlib.h> #include <string.h> @@ -186,13 +186,6 @@ static FFTSample frandom(AVLFG *prng) return (int16_t)av_lfg_get(prng) / 32768.0 * RANGE; } -static int64_t gettime(void) -{ - struct timeval tv; - gettimeofday(&tv,NULL); - return (int64_t)tv.tv_sec * 1000000 + tv.tv_usec; -} - static int check_diff(FFTSample *tab1, FFTSample *tab2, int n, double scale) { int i; @@ -430,7 +423,7 @@ int main(int argc, char **argv) /* we measure during about 1 seconds */ nb_its = 1; for(;;) { - time_start = gettime(); + time_start = av_gettime(); for (it = 0; it < nb_its; it++) { switch (transform) { case TRANSFORM_MDCT: @@ -456,7 +449,7 @@ int main(int argc, char **argv) #endif } } - duration = gettime() - time_start; + duration = av_gettime() - time_start; if (duration >= 1000000) break; nb_its *= 2; |