mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Add QPC frequency query to API.
This commit is contained in:
parent
1013ec8db7
commit
5e5bf928a5
@ -873,6 +873,17 @@ static Thread* s_sysTraceThread = nullptr;
|
||||
|
||||
TRACY_API bool ProfilerAvailable() { return s_instance != nullptr; }
|
||||
|
||||
TRACY_API int64_t GetFrequencyQpc()
|
||||
{
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
LARGE_INTEGER t;
|
||||
QueryPerformanceFrequency( &t );
|
||||
return t.QuadPart;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef TRACY_DELAYED_INIT
|
||||
struct ThreadNameData;
|
||||
TRACY_API moodycamel::ConcurrentQueue<QueueItem>& GetQueue();
|
||||
|
@ -60,6 +60,7 @@ TRACY_API GpuCtxWrapper& GetGpuCtx();
|
||||
TRACY_API uint64_t GetThreadHandle();
|
||||
TRACY_API void InitRPMallocThread();
|
||||
TRACY_API bool ProfilerAvailable();
|
||||
TRACY_API int64_t GetFrequencyQpc();
|
||||
|
||||
struct SourceLocationData
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user