QueryPerformanceCounter / QueryPerformanceFrequency code pls

Discussion about everything. New games, 3d math, development tips...
Post Reply
Revan1985
Posts: 89
Joined: Tue May 08, 2007 4:11 pm
Location: Italy

QueryPerformanceCounter / QueryPerformanceFrequency code pls

Post by Revan1985 »

i need an help whit a code for opengl...
i'm programming it under win32, and i need a code example for the timer [ not pseudo code or else, i need a c++ code, functionally ].
Can someone help me?
thanks ^^

p.s. if is the wrong section, sorry bout that, and move it in the right section ^^


p.p.s. i say that i search in the internet, but i don0t found a code, or i found only pseudo code, but it's the first time i use this 2 elements...
CPU: AMD PHENOMII X6 1090T BE 3,2GHZ
RAM : OCZ 8GB 2*4GB DDR3 LOW VOLTAGE 1333
VGA: GeForce GTX680 2GB
HD : 500GB + 500GB + 2x1TB Raid Edition + 500GB External
Motherboard: ASUS CROSSHAIR FORMULA 4 890FX AM3
PSU: Corsair 750W
CPU Cooling: Katana 2
stephaneR
Posts: 12
Joined: Fri Mar 28, 2008 9:10 pm

Post by stephaneR »

rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

\source\Irrlicht\os.cpp
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Revan1985
Posts: 89
Joined: Tue May 08, 2007 4:11 pm
Location: Italy

Post by Revan1985 »

thanks for the answers ^^'
i've only a problem.
In the Timer class, is used a GetTickCount(), that i can't find anywhere...
where the hell is it?

here the code

Code: Select all

	u32 Timer::getRealTime()
	{
		if (HighPerformanceTimerSupport)
		{
			LARGE_INTEGER nTime;
			QueryPerformanceCounter(&nTime);
			return u32((nTime.QuadPart) * 1000 / HighPerformanceFreq.QuadPart);
		}
		[b]return GetTickCount();[/b]
	}
i don't found the bold line called function...
CPU: AMD PHENOMII X6 1090T BE 3,2GHZ
RAM : OCZ 8GB 2*4GB DDR3 LOW VOLTAGE 1333
VGA: GeForce GTX680 2GB
HD : 500GB + 500GB + 2x1TB Raid Edition + 500GB External
Motherboard: ASUS CROSSHAIR FORMULA 4 890FX AM3
PSU: Corsair 750W
CPU Cooling: Katana 2
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Is Google firewalled from your location?
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Revan1985
Posts: 89
Joined: Tue May 08, 2007 4:11 pm
Location: Italy

Post by Revan1985 »

oops :oops:
i think was a function implemented in irrlicht...
sorry for the time spent ^^
thanks, now i've a timer :P
CPU: AMD PHENOMII X6 1090T BE 3,2GHZ
RAM : OCZ 8GB 2*4GB DDR3 LOW VOLTAGE 1333
VGA: GeForce GTX680 2GB
HD : 500GB + 500GB + 2x1TB Raid Edition + 500GB External
Motherboard: ASUS CROSSHAIR FORMULA 4 890FX AM3
PSU: Corsair 750W
CPU Cooling: Katana 2
Post Reply