Files
SatyandClaude Opus 5.5 a6920c183e Os time manager and Tools/GxTest
OsTimeManager ctor/Calibrate, create/destroy, OsTimeStartup/Shutdown,
async clock getters, OsGetNumberOfProcessors. GxTest creates the D3D
device and runs a clear/present loop; stops at the unported texture path.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-25 03:03:19 +02:00

37 lines
1004 B
C++

#ifndef ENGINE_SOURCE_OS_TIMEMANAGER_H
#define ENGINE_SOURCE_OS_TIMEMANAGER_H
#include <cstdint>
class OsTimeManager {
public:
enum TimingMethod {
NotSet = -1,
BestAvailable = 0,
SystemMethod1 = 1,
SystemMethod2 = 2,
};
/* 0000 */ double m_scaleToMs;
/* 0008 */ OsTimeManager::TimingMethod m_timingMethod;
/* 000C */ uint32_t m_timingTestError;
/* 0010 */ int64_t m_performanceFrequency;
/* 0018 */ double m_timeBegin;
OsTimeManager(OsTimeManager::TimingMethod method);
OsTimeManager::TimingMethod Calibrate();
uint64_t Snapshot();
};
uint32_t OsTimeGetTestError();
OsTimeManager::TimingMethod OsTimeGetTimingMethod();
const char* GetTimingMethodName(OsTimeManager::TimingMethod method);
uint32_t OsGetAsyncTimeMs();
uint64_t OsGetAsyncTimeClocks();
int64_t OsGetAsyncClocksPerSecond();
void OsTimeManagerCreate(OsTimeManager::TimingMethod method);
void OsTimeManagerDestroy();
void OsSleep(uint32_t milliseconds);
#endif