Hi, On Fri, 2004-04-02 at 16:02, shailesh kumar wrote: > I want to know how can I use performanceCounter to measure fraterate . > I am not able to figureout exactly what does osg::getPerfCounter() and > osg::getPerfCounterFreq > give me .
PerfCounter retrieves the current counter value and PerfCounterFreq tells you the count/second ratio, so to measure the frame rate do something like : Int64 startCount = getPerfCounter(); <frame stuff> Int64 countDiff = getPerfCounter() - startCount; in order to get a time (in seconds) instead of a simple number just do : Real64 frameTime = countDiff / getPerCounterFreq(); for simple framerates you can also just do : Time startTime = getSystemTime(); <frame stuff> Time timeDiff = getSystemTime() - startTime; this also gives you the frame time in seconds. regards gerrit ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
