Solved

time based loop

Posted on 2001-07-12
5
236 Views
Last Modified: 2010-05-18
Hi,

Looking for time based loop in c or c++. Im trying to
implement a frame/sec rendering architecture in my application.

All i need is a reliable time base loop.

Thanks,
0
Comment
Question by:ctrembla
5 Comments
 
LVL 4

Expert Comment

by:Neutron
ID: 6278480
Which OS?

Greetings,
    Ntr:)
0
 

Author Comment

by:ctrembla
ID: 6278504
Hi Neutron,

multiplatform.  I already have a function to retreive the
time that is multiplatform.
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6280019
There are several ways you can do that. Use the getTime function to retrieve the time, and keep that in mind. Then use it again for the next frame. Calculate the difference in seconds. Then do 1 / difInSeconds and you have the fps...of course reset the first time variable to the newer value.

Regards,
CJ
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7487625

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts removed
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 7518839
Per recommendation, points NOT refunded and question closed.

Netminder
EE Admin
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
What are programming codes and how do they work? 7 112
Using Third Party DLL with Access VBA 14 51
Vector, list Questions R 6 45
programming a polycom voip phone 3 52
A short article about a problem I had getting the GPS LocationListener working.
A short article about problems I had with the new location API and permissions in Marshmallow
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question