fixed windows time

This commit is contained in:
Gero Müller 2011-01-14 22:02:14 +01:00
parent 2915c8a030
commit cd3c163d2a
1 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@
#define MEAN_AND_LEAN
#include <windows.h>
static int _hasPerformanceCounter;
static bool _hasPerformanceCounter;
static unsigned int _t0_32;
static __int64 _t0_64;
static double _resolution = 0.0;
@ -26,13 +26,13 @@ static void _init() {
if( QueryPerformanceFrequency( (LARGE_INTEGER *)&freq ) )
{
// Performance counter is available => use it!
_hasPerformanceCounter = GL_TRUE;
_hasPerformanceCounter = true;
// Counter resolution is 1 / counter frequency
_resolution = 1.0 / (double)freq;
// Set start time for timer
QueryPerformanceCounter( (LARGE_INTEGER *)&__t0_64 );
QueryPerformanceCounter( (LARGE_INTEGER *)&_t0_64 );
}
else
{