mirzaakhena / gtge

Automatically exported from code.google.com/p/gtge
0 stars 0 forks source link

FPSCounter should call refresh() upon construction #9

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The FPSCounter class should invoke refresh() upon construction, or simply 
set the lastCount private variable to equal System.currentTimeMillis().

Otherwise, the first call to calculateFPS() will store 1 to be returned as 
the program's FPS for the first counting.  Subsequent calls will be 
accurate.

This may affect games which log the FPS via AOP to use as a debugging 
tool, but this issue is of low priority.

Original issue reported on code.google.com by MetroidF...@gmail.com on 20 Apr 2008 at 8:23

GoogleCodeExporter commented 8 years ago
The FPSCounter refresh() is indeed called when the timer is about to start, see 
the
SystemTimer.startTimer() method.
So no problem in here.

Original comment by pau...@gmail.com on 21 Apr 2008 at 2:38