From: James Benton Date: Wed, 29 Aug 2012 10:30:23 +0000 (+0100) Subject: Fix bug in profiling time synchronisation. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=4c1666d004e501c8abcb5f2ef51808ed09e3b651;p=apitrace Fix bug in profiling time synchronisation. --- diff --git a/retrace/glretrace_main.cpp b/retrace/glretrace_main.cpp index 44b278f..d857d03 100755 --- a/retrace/glretrace_main.cpp +++ b/retrace/glretrace_main.cpp @@ -299,7 +299,7 @@ frame_complete(trace::Call &call) { getCurrentTimes(cpuTime, gpuTime); cpuTime = cpuTime - retrace::profiler.getBaseCpuTime(); gpuTime = gpuTime - retrace::profiler.getBaseGpuTime(); - error = gpuTime - cpuTime; + error = gpuTime - cpuTime * (1.0E9 / os::timeFrequency); retrace::profiler.setBaseGpuTime(retrace::profiler.getBaseGpuTime() + error); }