23#include <sys/sys_time.h>
24#include <sys/time_util.h>
28#if defined (SUNOS) || defined (__SUNOS__)
32#include <mach/mach_time.h>
33#include <TargetConditionals.h>
36#if defined(WIN32) || defined(_WIN32)
38#define BT_USE_WINDOWS_TIMERS
39#define WIN32_LEAN_AND_MEAN
50#define GetTickCount64 GetTickCount
61#ifdef BT_LINUX_REALTIME
68#define mymin(a,b) (a > b ? a : b)
73#ifdef BT_USE_WINDOWS_TIMERS
94#ifdef BT_USE_WINDOWS_TIMERS
121#ifdef BT_USE_WINDOWS_TIMERS
145#ifdef BT_USE_WINDOWS_TIMERS
180#ifdef BT_USE_WINDOWS_TIMERS
214#ifdef BT_USE_WINDOWS_TIMERS
257#ifdef BT_LINUX_REALTIME
260 return 1000000000*
ts.tv_sec +
ts.tv_nsec;
321 RecursionCounter( 0 ),
400 unsigned long int time;
616 unsigned long int time;
634 printf(
"----------------------------------\n");
693 #if defined(__MINGW32__) || defined(__MINGW64__)
unsigned long long int uint64_t
const T & btMax(const T &a, const T &b)
btEnterProfileZoneFunc * btGetCurrentEnterProfileZoneFunc()
void btSetCustomEnterProfileZoneFunc(btEnterProfileZoneFunc *enterFunc)
static btEnterProfileZoneFunc * bts_enterFunc
static btClock gProfileClock
float Profile_Get_Tick_Rate(void)
void btLeaveProfileZone()
void btLeaveProfileZoneDefault()
void btSetCustomLeaveProfileZoneFunc(btLeaveProfileZoneFunc *leaveFunc)
void btEnterProfileZoneDefault(const char *name)
void btEnterProfileZone(const char *name)
unsigned int btQuickprofGetCurrentThreadIndex2()
void Profile_Get_Ticks(unsigned long int *ticks)
CProfileNode gRoots[BT_QUICKPROF_MAX_THREAD_COUNT]
static btLeaveProfileZoneFunc * bts_leaveFunc
CProfileNode * gCurrentNodes[BT_QUICKPROF_MAX_THREAD_COUNT]
btLeaveProfileZoneFunc * btGetCurrentLeaveProfileZoneFunc()
const unsigned int BT_QUICKPROF_MAX_THREAD_COUNT
unsigned int btQuickprofGetCurrentThreadIndex2()
void btLeaveProfileZoneFunc()
void btEnterProfileZoneFunc(const char *msg)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
unsigned int btGetCurrentThreadIndex()
static ThreadsafeCounter gThreadCounter
An iterator to navigate through the tree.
void Enter_Child(int index)
CProfileNode * CurrentChild
CProfileNode * CurrentParent
CProfileIterator(CProfileNode *start)
static void Increment_Frame_Counter(void)
static void Release_Iterator(CProfileIterator *iterator)
static float Get_Time_Since_Reset(void)
static CProfileIterator * Get_Iterator(void)
static int Get_Frame_Count_Since_Reset(void)
static void CleanupMemory(void)
static void dumpRecursive(CProfileIterator *profileIterator, int spacing)
static void Start_Profile(const char *name)
static void Stop_Profile(void)
static unsigned long int ResetTime
A node in the Profile Hierarchy Tree.
CProfileNode * Get_Sub_Node(const char *name)
CProfileNode * Get_Parent(void)
unsigned long int StartTime
CProfileNode(const char *name, CProfileNode *parent)
CProfileNode * Get_Child(void)
CProfileNode * Get_Sibling(void)
CProfileSample(const char *name)
The btClock is a portable basic clock that measures accurate time in seconds, use for profiling.
btScalar getTimeSeconds()
Returns the time in s since the last call to reset or since the Clock was created.
unsigned long long int getTimeNanoseconds()
void reset()
Resets the initial reference time.
struct btClockData * m_data
unsigned long long int getTimeMilliseconds()
Returns the time in ms since the last call to reset or since the btClock was created.
unsigned long long int getTimeMicroseconds()
Returns the time in us since the last call to reset or since the Clock was created.
btClock()
The btClock is a portable basic clock that measures accurate time in seconds, use for profiling.
btClock & operator=(const btClock &other)
LARGE_INTEGER mClockFrequency