Original Post
Hey all, Id like to calculate the AVERAGE framerate aswel as the normal fps. The normal fps is working, but the average isnt.
Im trying to do so like this:
// global long active = 0; // amount of seconds the program is active int average_fps = 0; // duh // in the loop .. active++; average_fps = (average_fps + fps) / active; ..By the time of the line active++; fps contains the current framerate. Im not sure why, but something is going wrong. If I let my program run for a while, the average_fps keeps getting lower and lower...