Files
Client/Tools/ClientSetup/timer.cpp
LGram16 e067522598 Initial commit: ROW Client source code
Game client codebase including:
- CharacterActionControl: Character and creature management
- GlobalScript: Network, items, skills, quests, utilities
- RYLClient: Main client application with GUI and event handlers
- Engine: 3D rendering engine (RYLGL)
- MemoryManager: Custom memory allocation
- Library: Third-party dependencies (DirectX, boost, etc.)
- Tools: Development utilities

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 16:24:34 +09:00

55 lines
1.3 KiB
C++

#define TIMER_CPP
#define CORE_DLL
/***************************************************************\
^^^^^^^^ ^^^^^^^^ ^^^^^^^^ ^^^^^^^^
^^ ^^ ^^ ^^ ^^ ^^ ^^
^^ ^^^^^^^^ ^^ ^^^^^^^^
^^ ^^^ ^^ ^^ ^^ ^^ ^^
^^ ^^ ^^ ^^ ^^ ^^ ^^
^^^^^^^^ ^^ ^^ ^^^^^^^^ ^^ ^^
sample code from the book...
Real Time 3D Terrain Engines Using C++ and DirectX
by Greg Snook
greg@mightystudios.com
\***************************************************************/
#include "timer.h"
#include "windows.h"
#include "GMMemory.h"
using namespace gaia;
uint32 cTimer::s_secondsFrequency = 0;
uint32 cTimer::s_millisecondsFrequency = 0;
float cTimer::s_invSecFrequency = 0.0f;
void cTimer::setupTimerFrequency()
{
if (!s_secondsFrequency)
{
LARGE_INTEGER frequency;
QueryPerformanceFrequency(&frequency);
s_secondsFrequency = frequency.LowPart;
s_millisecondsFrequency = frequency.LowPart/1000;
s_invSecFrequency = 1.0f/(float)s_secondsFrequency;
}
}
uint32 cTimer::samplePerformanceCounter()
{
LARGE_INTEGER sample;
QueryPerformanceCounter(&sample);
return sample.LowPart;
}
//***************************************************************
// end of file ( Timer.cpp )
//----------------------------------------------------------
//$Log: $