Animometer: update FPS calculation

Change-Id: Idd173038505ce0af388a1fad2add673a40e6b0bf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132760
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Peng Huang <penghuang@chromium.org>
This commit is contained in:
Peng Huang 2023-05-15 17:01:49 +00:00 committed by Dawn LUCI CQ
parent 074ddbc10f
commit 90b9ac2b7b
1 changed files with 2 additions and 1 deletions

View File

@ -190,7 +190,8 @@ int main(int argc, const char* argv[]) {
frameCount++; frameCount++;
frame(); frame();
if (frameCount % 60 == 0) { if (frameCount % 60 == 0) {
printf("FPS: %lf\n", static_cast<double>(frameCount) / timer->GetElapsedTime()); printf("FPS: %lf\n", 60.0 / timer->GetElapsedTime());
timer->Start();
} }
} }
} }