This commit is contained in:
张珂 2024-06-18 20:33:10 +08:00
commit 653a3a69cb

View File

@ -161,13 +161,13 @@ inline void SyncFenceTracker::UpdateFrameQueue(int32_t startTime)
frameStartTimes->push(startTime);
}
int32_t SyncFenceTracker::GetFrameRate()
inline int32_t SyncFenceTracker::GetFrameRate()
{
int32_t frameRate = 0;
auto frameNum = frameStartTimes->size();
if (frameNum > 1) {
auto interval = frameStartTimes->back() - frameStartTimes->front();
if(interval > 0) {
if (interval > 0) {
frameRate = FRAME_PERIOD * (frameNum - 1) / interval;
}
}