-void Profiler::addFrameStart(unsigned no, uint64_t gpuStart, uint64_t cpuStart)
-{
- if (baseGpuTime == 0) {
- baseGpuTime = gpuStart;
- }
-
- if (baseCpuTime == 0) {
- baseCpuTime = cpuStart;
- }
-
- if (gpuTimes) {
- lastFrame.gpuStart = gpuStart - baseGpuTime;
- } else {
- lastFrame.gpuStart = 0;
- }
-
- if (cpuTimes) {
- lastFrame.cpuStart = cpuStart - baseCpuTime;
- } else {
- lastFrame.cpuStart = 0;
- }
-
- lastFrame.no = no;
-
- std::cout << "frame_begin"
- << " " << lastFrame.no
- << " " << lastFrame.gpuStart
- << " " << lastFrame.cpuStart
- << std::endl;
-}
-
-void Profiler::addFrameEnd(uint64_t gpuEnd, uint64_t cpuEnd)