The advantage is you smooth the framerate. What if your framerate is 12, 16, 12, 16 (ms)? You can't make the 16's speed up, so the only way to smooth it out is to slow down the 12's.
Of course it's not perfect. If you get just one 50ms frame, and the rest are normal, then you'll get a few frames that are slower that don't need to be. But if that concerns you so much, then you can always modify the way you select the "slowest" frame, so that it doesn't pick the slowest if there's only one frame there. Maybe you could pick the second slowest?
I kinda doubt you'll have many cases through where you get just one slow frame. Most likely you will get several slow frames in a row if the hard drive is being accessed or the user tabs out. Good luck determining what exactly caused the slowdown and whether you should ignore it or not. :-)
Picking the average is one of the things I tried. I also tried picking the median. Neither resulted in a rock solid fps. This method does. The FPS counter in the corner of the screen will sit at one number for a really long time, as if you're averaging it over a long time period. All the other methods I tried allowed it to still fluctuare by one or two milliseconds. But one or two millisecond fluctuations weren't noticable.
Of course it's not perfect. If you get just one 50ms frame, and the rest are normal, then you'll get a few frames that are slower that don't need to be. But if that concerns you so much, then you can always modify the way you select the "slowest" frame, so that it doesn't pick the slowest if there's only one frame there. Maybe you could pick the second slowest?
I kinda doubt you'll have many cases through where you get just one slow frame. Most likely you will get several slow frames in a row if the hard drive is being accessed or the user tabs out. Good luck determining what exactly caused the slowdown and whether you should ignore it or not. :-)
Picking the average is one of the things I tried. I also tried picking the median. Neither resulted in a rock solid fps. This method does. The FPS counter in the corner of the screen will sit at one number for a really long time, as if you're averaging it over a long time period. All the other methods I tried allowed it to still fluctuare by one or two milliseconds. But one or two millisecond fluctuations weren't noticable.