Skip to main content

Timeline for Simple framerate counter?

Current License: CC BY-SA 3.0

13 events
when toggle format what by license comment
S Jul 27, 2018 at 23:24 history rollback Maximus Minimus
Rollback to Revision 2 - Edit approval overridden by post owner or moderator
Jul 27, 2018 at 22:29 history suggested Beyondo CC BY-SA 4.0
Improved spelling, Fixed typos, Corrected code. Clarified more. Sorry, I just felt bored. XD
Jul 27, 2018 at 20:24 review Suggested edits
S Jul 27, 2018 at 23:24
S Sep 5, 2016 at 18:58 history suggested CommunityBot CC BY-SA 3.0
correct spelling
Sep 5, 2016 at 15:39 review Suggested edits
S Sep 5, 2016 at 18:58
Mar 19, 2016 at 11:15 comment added Ciro Santilli OurBigBook.com How to you distinguish between draw calls and actual renderings?
Sep 10, 2014 at 15:39 vote accept ezio160324
Sep 10, 2014 at 7:41 comment added Maximus Minimus @congusbongus - I'm drawing a distintion between using Sleep to save power and using it to control framerate. The former is appropriate, the latter is not. Even if Sleep were reliable and even if it gave you sub-millisecond control, Sleep (1/60) wouldn't give you 60fps because it doesn't account for the time taken to actually run the frame. You still need a proper timer.
Sep 10, 2014 at 5:35 comment added v.oddou @congusbongus : i was heading to the comments to say exactly that. +1 Also as a supplentary comment for FPS counting, the regulated update (every 250ms) is good for stability, there is an even better method to my sense (the one unreal tournament uses), is a rolling average based on a fixed time frame, with varying sampling. Of course the OP here seems confused enough, so the answer is well suited.
Sep 10, 2014 at 2:24 comment added congusbongus You're not using Sleep calls to control framerate (if you are, stop it now). Whoa now, I wouldn't be so absolute. Sleep is unreliable and hence it's unwise to use it alone, but it's perfectly reasonable to use it if you can manage the unreliability by using it with a more precise method. Doing so makes sure you don't peg your CPU at 100%, which is important for anything that runs on batteries.
Sep 10, 2014 at 2:14 comment added glampert Your code is pretty good, but I would suggest replacing that Win32 BOOL by just bool/true|false. Any decent C compiler can run C99 these days, so I don't see a reason to still rely on the MS typedefs.
Sep 9, 2014 at 23:52 comment added Maximus Minimus The standard "don't measure FPS, measure milliseconds per frame" disclaimer applies here, but I should note that an FPS count is what players are used to seeing and provides a number that's meaningful to them, so despite the disclaimer I find that an FPS count still has value.
Sep 9, 2014 at 23:50 history answered Maximus Minimus CC BY-SA 3.0