| 72 | struct TimeSection |
| 73 | { |
| 74 | TimeSection( Tr2ProfileTimer& timer, const char* name, const Tr2ProfileTimer& rootTimer, Tr2RenderContext& renderContext ) : |
| 75 | m_timer( timer ) |
| 76 | { |
| 77 | if( rootTimer.GetCaptureCpuTime() || rootTimer.GetCaptureGpuTime() ) |
| 78 | { |
| 79 | m_timer.SetStatName( ( rootTimer.GetStatName() + std::string( "/" ) + name ).c_str() ); |
| 80 | m_timer.SetCaptureCpuTime( rootTimer.GetCaptureCpuTime() ); |
| 81 | m_timer.SetCaptureGpuTime( rootTimer.GetCaptureGpuTime() ); |
| 82 | m_timer.Begin( renderContext ); |
| 83 | m_renderContext = &renderContext; |
| 84 | } |
| 85 | else |
| 86 | { |
| 87 | m_timer.SetCaptureCpuTime( false ); |
| 88 | m_timer.SetCaptureGpuTime( false ); |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | TimeSection( const TimeSection& ) = delete; |
| 93 | TimeSection& operator=( const TimeSection& ) = delete; |
nothing calls this directly
no test coverage detected