Solved

time based loop

Posted on 2001-07-12
5
232 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
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…

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now