Fixed max frame count off-by-one; exit loop at very end
Fixed max frame count off-by-one; exit loop at very end

process keypress and loop time measurement before exiting if max_frames
as been supplied,
  - so it becomes possible to suspend a single frame
  - the full frame statistics will be printed, event for a single frame

bbiskup/peregrino,bbiskup/peregrino