예제 #1
0
void CCProfiler::displayTimers()
{
    CCDictElement* pElement = NULL;
    CCDICT_FOREACH(m_pActiveTimers, pElement)
    {
        CCProfilingTimer* timer = (CCProfilingTimer*)pElement->getObject();
        CCLog("%s", timer->description());
    }
예제 #2
0
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;
	}