Skip to content

Commit

Permalink
Fixed the FPS logging to include the actual elapsed time
Browse files Browse the repository at this point in the history
  • Loading branch information
zsolt-donca committed Mar 5, 2021
1 parent f06bc74 commit f6c44ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/screencast/fps_limit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f6c44ca

Please sign in to comment.