From f6c44ca51359a4cc4394aeeb9b00f973ce31f550 Mon Sep 17 00:00:00 2001 From: Zsolt Donca Date: Fri, 5 Mar 2021 09:46:15 +0200 Subject: [PATCH] Fixed the FPS logging to include the actual elapsed time --- src/screencast/fps_limit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/screencast/fps_limit.c b/src/screencast/fps_limit.c index 168db764..f34c874b 100644 --- a/src/screencast/fps_limit.c +++ b/src/screencast/fps_limit.c @@ -62,8 +62,8 @@ void measure_fps(struct fps_limit_state *state, struct timespec *now) { double avg_frames_per_sec = state->fps_frame_count / elapsed_sec; - logprint(DEBUG, "fps_limit: average FPS in the last %0.0f seconds: %0.2f", - FPS_MEASURE_PERIOD_SEC, avg_frames_per_sec); + logprint(DEBUG, "fps_limit: average FPS in the last %0.2f seconds: %0.2f", + elapsed_sec, avg_frames_per_sec); state->fps_last_time = *now; state->fps_frame_count = 0;