void CCProfiler::displayTimers()
{
    CCDictElement* pElement = NULL;
    CCDICT_FOREACH(m_pActiveTimers, pElement)
    {
        CCProfilingTimer* timer = (CCProfilingTimer*)pElement->getObject();
        CCLog("%s", timer->description());
    }
CCProfilingTimer* CCProfiler::createAndAddTimerWithName(const char* timerName)
{
    CCProfilingTimer *t = new CCProfilingTimer();
    t->initWithName(timerName);
    m_pActiveTimers->setObject(t, timerName);
    t->release();

    return t;
}
示例#3
0
void CCProfiler::displayTimers()
{
    CAMap<std::string, CCProfilingTimer*>::iterator itr;
    for (itr=m_mActiveTimers.begin(); itr!=m_mActiveTimers.end(); itr++)
    {
        CCProfilingTimer* timer = itr->second;
        CCLog("%s", timer->description());
    }
}
示例#4
0
CCProfilingTimer* CCProfiler::createAndAddTimerWithName(const char* timerName)
{
    CCProfilingTimer *t = new CCProfilingTimer();
    t->initWithName(timerName);
    m_mActiveTimers.insert(timerName, t);
    t->release();

    return t;
}
示例#5
0
void CCProfilingResetTimingBlock(const char *timerName)
{
    CCProfiler* p = CCProfiler::sharedProfiler();
    CCProfilingTimer *timer = p->m_mActiveTimers.getValue(timerName);

    CCAssert(timer, "CCProfilingTimer not found");

    timer->reset();
}
示例#6
0
	CCProfilingTimer* CCProfiler::timerWithName(const char *pszTimerName, CCObject *pInstance)
	{
		CCProfiler *p = CCProfiler::sharedProfiler();
		CCProfilingTimer *t = new CCProfilingTimer();
		t->initWithName(pszTimerName, pInstance);
		p->m_pActiveTimers->addObject(t);
		t->release();

		return t;
	}