-void Profiler::addFrameStart(unsigned no, int64_t gpuStart, int64_t cpuStart)
-{
- lastFrame.no = no;
- lastFrame.gpuStart = gpuStart;
- lastFrame.cpuStart = cpuStart;
-
- if (gpuTimes) {
- gpuStart = gpuStart - baseGpuTime;
- } else {
- gpuStart = 0;
- }
-
- if (cpuTimes) {
- double cpuTimeScale = 1.0E9 / os::timeFrequency;
- cpuStart = (cpuStart - baseCpuTime) * cpuTimeScale;
- } else {
- cpuStart = 0;
- }
-
- std::cout << "frame_begin"
- << " " << no
- << " " << gpuStart
- << " " << cpuStart
- << std::endl;
-}
-
-void Profiler::addFrameEnd(int64_t gpuEnd, int64_t cpuEnd)