TNTBasic: Getting the framerate

Hi, I decided to try out TNTBasic whilst I wait for a book at my local library on carbon programming to come in...basically I'm just using TNTBasic to try out some game physics, I chose it because it does rotation...important if I want to do something more than straight-line physics. Anyway, whilst doing this I got stumped, you see, I need to find the fps so that no matter what computer it runs on or whatever other background tasks I have going on, my white square will still move the same amount of pixels in one second...if I'm making any sense whatsoever. Now I know I can set the framerate, but thats no good because the framerate will still vary, so the only thing I can do is 'set framerate max' ...but that is problematic because I need to actually get the framerate so I can do the simple calculation, and I can't just do 'int fps=set framerate max'...sorry, I know its a real simple question and prolly shouldn't be on here...but any help most appreciated .

Create two global variables (or whatever the TNT equivalent is). Set one to the current system time in whatever unit it gives you. The other should be increased every time you draw the frame. Whenever you want the FPS, divide the frame counter by the time. Thats how many average frames you've achieved per millisecond, second, or whatever time unit the time function you use gives. You can adjust to seconds fairly easily.
Steven

Did you ever wonder why we had to run for shelter when the promise of a brave new world unfurled beneath the clear blue sky?

Oh, right, yes, thanks , I knew what you meant first time round though. Don't quite understand why TNTBasic has a facility to show the fps but yet, doesn't let you use it for your own use, only it's. If I'm making any sense. Anyway, I'll do what you said , thanks again.