diff options
author | Olivier Langlois <olivier@trillion01.com> | 2014-05-06 17:16:47 -0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-19 02:35:07 +0200 |
commit | 76191c08f88fd66cf9198afc0c4a809c4c0336d4 (patch) | |
tree | d74bac8092ca81b2abcdac087971b48dce720bdd /cmdutils_opencl.c | |
parent | e705d0ce1cd3b428ee2d03db6517e189dc3b142d (diff) | |
download | ffmpeg-76191c08f88fd66cf9198afc0c4a809c4c0336d4.tar.gz |
ffmpeg: 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 'cmdutils_opencl.c')
-rw-r--r-- | cmdutils_opencl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmdutils_opencl.c b/cmdutils_opencl.c index 2a04db9a8a..0fa8cc0ada 100644 --- a/cmdutils_opencl.c +++ b/cmdutils_opencl.c @@ -181,12 +181,12 @@ static int64_t run_opencl_bench(AVOpenCLExternalEnv *ext_opencl_env) OCLCHECK(clSetKernelArg, kernel, arg++, sizeof(cl_int), &width); OCLCHECK(clSetKernelArg, kernel, arg++, sizeof(cl_int), &height); - start = av_gettime(); + start = av_gettime_relative(); for (i = 0; i < OPENCL_NB_ITER; i++) OCLCHECK(clEnqueueNDRangeKernel, ext_opencl_env->command_queue, kernel, 2, NULL, global_work_size_2d, local_work_size_2d, 0, NULL, NULL); clFinish(ext_opencl_env->command_queue); - ret = (av_gettime() - start)/OPENCL_NB_ITER; + ret = (av_gettime_relative() - start)/OPENCL_NB_ITER; end: if (kernel) clReleaseKernel(kernel); |