void Profiler::end(string mId) { if (!active) return; ProfilerObj* cObj = getObj(mId); if (cObj != NULL) cObj->end(); }
void Profiler::start(string mId) { ProfilerObj* cObj = getObj(mId); if (cObj != NULL) { cObj->start(); } else { ProfilerObj* newObj = new ProfilerObj(mId); newObj->start(); obj.push_back(newObj); } }
void Profiler::show(string mId) { ProfilerObj* cObj = getObj(mId); if (cObj != NULL) cObj->show(); }
int Profiler::getElapsed(string mId) { ProfilerObj* cObj = getObj(mId); if (cObj != NULL) return cObj->getElapsed(); return 0; }
void Profiler::end(string mId) { ProfilerObj* cObj = getObj(mId); if (cObj != NULL) cObj->end(); }