40class EXPCL_PANDA_EXPRESS ProfileTimer {
41 enum { MaxEntriesDefault=4096 };
43 explicit ProfileTimer(
const char* name=0,
int maxEntries=MaxEntriesDefault);
44 ProfileTimer(
const ProfileTimer& other);
47 void init(
const char* name,
int maxEntries=MaxEntriesDefault);
50 void mark(
const char* tag);
52 void off(
const char* tag);
56 double getTotalTime()
const;
57 static void consolidateAllTo(std::ostream &out=std::cout);
58 void consolidateTo(std::ostream &out=std::cout)
const;
59 static void printAllTo(std::ostream &out=std::cout);
60 void printTo(std::ostream &out=std::cout)
const;
70 class EXPCL_PANDA_EXPRESS AutoTimer {
72 AutoTimer(ProfileTimer& profile,
const char* tag);
76 ProfileTimer& _profile;
81 static ProfileTimer* _head;