summaryrefslogtreecommitdiff
path: root/libavcodec/fft-test.c
diff options
context:
space:
mode:
authorOlivier Langlois <olivier@trillion01.com>2014-05-06 17:16:49 -0400
committerMichael Niedermayer <michaelni@gmx.at>2014-05-17 15:51:49 +0200
commitb052bccbe4b5533c3f11fddb14df59fb72dbf463 (patch)
treeafe015f1ab22ce40799862b1a6b299af40e08797 /libavcodec/fft-test.c
parent0eec06ed8747923faa6a98e474f224d922dc487d (diff)
downloadffmpeg-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/fft-test.c')
-rw-r--r--libavcodec/fft-test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/fft-test.c b/libavcodec/fft-test.c
index a29896fde7..7d8f8e5244 100644
--- a/libavcodec/fft-test.c
+++ b/libavcodec/fft-test.c
@@ -438,7 +438,7 @@ int main(int argc, char **argv)
/* we measure during about 1 seconds */
nb_its = 1;
for(;;) {
- time_start = av_gettime();
+ time_start = av_gettime_relative();
for (it = 0; it < nb_its; it++) {
switch (transform) {
case TRANSFORM_MDCT:
@@ -464,7 +464,7 @@ int main(int argc, char **argv)
#endif
}
}
- duration = av_gettime() - time_start;
+ duration = av_gettime_relative() - time_start;
if (duration >= 1000000)
break;
nb_its *= 2;