Framerate()

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Keph_
User
User
Posts: 13
Joined: Fri Apr 25, 2003 6:10 pm

Framerate()

Post by Keph_ »

It would be great if a Framerate() function was included in PureBasic, like the screen fps() function of DarkBasic...
User avatar
waffle
Enthusiast
Enthusiast
Posts: 129
Joined: Mon May 12, 2003 1:34 pm
Location: USA
Contact:

Post by waffle »

you can always code that yourself, its rather easy.

Windows:

TimeDelay.l=100
MasterTimer.l=GetTickCount_()
;game loop
repeat
FlipBuffers()
;and other code...

TimeDelay=GetTickCount_()-MasterTimer
MasterTimer=GetTickCount_()
FrameRate.f=1000/TimeDelay
until quit
Keph_
User
User
Posts: 13
Joined: Fri Apr 25, 2003 6:10 pm

Post by Keph_ »

Thx waffle.
I have already done it, but I thinks it would be great id this function was in the Pure directly.
Post Reply