I am having trouble calculating my frames per second. I have a function that computes it but I know its wrong because its always less than 1 and there is no way thats right because I can move my object around and it doesnt even flicker.
here is my function what am I doing wrong
void calc_fps()
{
char fps[20] = {0};
float time,cur_time;
float total;
static float prev_time = 0.0;
time=glutGet(GLUT_ELAPSED_TIME);
cur_time=time-prev_time;
prev_time=time;
total = cur_time/1000.0;sprintf(fps,“FPS:%f”, total);
}