1 #ifndef _PFC_PROFILER_H_
2 #define _PFC_PROFILER_H_
33 #define profiler(name) \
34 static pfc::profiler_static profiler_static_##name(#name); \
35 pfc::profiler_local profiler_local_##name(&profiler_static_##name);
48 double ret =
_query(current);
61 if (!QueryPerformanceCounter(&val))
throw pfc::exception_not_implemented();
66 if (!QueryPerformanceFrequency(&val))
throw pfc::exception_not_implemented();
79 return _query(GetTickCount());
94 if (time < (
m_last_seen & 0xFFFFFFFF)) time += 0x100000000;
109 double query()
const;
pfc::string8 queryString(unsigned precision=3)
void _start(t_uint32 p_time)
pfc::string8 queryString(unsigned precision=6)
uint64_t fileTimeUtoW(uint64_t ft)
double _query(t_uint64 p_val) const
static t_uint64 g_query()
static t_uint64 g_query_freq()
double _query(t_uint32 p_time) const
profiler_local(profiler_static *p_owner)
void add_time(t_int64 delta)
uint64_t fileTimeWtoU(uint64_t ft)
profiler_static(const char *p_name)