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>
This commit is contained in:
parent
0eec06ed87
commit
b052bccbe4
3 changed files with 8 additions and 8 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue