I was using a technique I found in a book that seemed weird anyway, so I went back to just getting the time at the beginning and end of display() and subtracting them.
This yielded a result of 0 (zero) ms passing between the two points. That still seems a little weird, but that's what I got. Then again, I don't really know jack about OpenGL, so maybe that IS reasonable.
The clock in your computer isn't accurate or fast enough to generate a time delta for one frame of drawing nothing.
What you should do is create a frame counter that you increment everytime you draw and after say .25 seconds compute the FPS using your frame counter with an equation like the following.
1 2 3 4 5 6 7 8
| time = getTime() timeDelta = oldTime - time if(timeDelta > .25s) { fps = frameCount * (1.0s/timeDelta) frameCount = 0 oldTime = time } |