Solved

time based loop

Posted on 2001-07-12
5
227 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
Comment Utility
Which OS?

Greetings,
    Ntr:)
0
 

Author Comment

by:ctrembla
Comment Utility
Hi Neutron,

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

Expert Comment

by:CJ_S
Comment Utility
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
Comment Utility

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
Comment Utility
Per recommendation, points NOT refunded and question closed.

Netminder
EE Admin
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This is an explanation of a simple data model to help parse a JSON feed
This is about my first experience with programming Arduino.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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…

763 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

7 Experts available now in Live!

Get 1:1 Help Now