Solved

time based loop

Posted on 2001-07-12
5
235 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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
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…

860 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