]> git.cworth.org Git - apitrace/commitdiff
Fix bug in profiling time synchronisation.
authorJames Benton <jbenton@vmware.com>
Wed, 29 Aug 2012 10:30:23 +0000 (11:30 +0100)
committerJames Benton <jbenton@vmware.com>
Wed, 29 Aug 2012 10:30:23 +0000 (11:30 +0100)
retrace/glretrace_main.cpp

index 44b278fc9f25a13c3aa8d44a544eae2a58d0e5ed..d857d03604b649ea145076da4367270dccc09f82 100755 (executable)
@@ -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);
         }