mirror of https://github.com/axmolengine/axmol.git
fixed #265
This commit is contained in:
parent
6de3f0f404
commit
5f563102e9
|
@ -109,14 +109,14 @@ namespace cocos2d
|
|||
|
||||
void CCProfilingBeginTimingBlock(CCProfilingTimer *pTimer)
|
||||
{
|
||||
CCTime::gettimeofday(&pTimer->getStartTime(), NULL);
|
||||
CCTime::gettimeofdayCocos2d(&pTimer->getStartTime(), NULL);
|
||||
}
|
||||
|
||||
void CCProfilingEndTimingBlock(CCProfilingTimer *pTimer)
|
||||
{
|
||||
struct cc_timeval currentTime;
|
||||
CCTime::gettimeofday(¤tTime, NULL);
|
||||
CCTime::timersub(¤tTime, &pTimer->getStartTime(), ¤tTime);
|
||||
CCTime::gettimeofdayCocos2d(¤tTime, NULL);
|
||||
CCTime::timersubCocos2d(¤tTime, &pTimer->getStartTime(), ¤tTime);
|
||||
double duration = currentTime.tv_sec * 1000.0 + currentTime.tv_usec / 1000.0;
|
||||
|
||||
// return in milliseconds
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace cocos2d
|
|||
bool init(void);
|
||||
|
||||
public:
|
||||
static CCProfiler* getSharedProfiler(void);
|
||||
static CCProfiler* sharedProfiler(void);
|
||||
static CCProfilingTimer* timerWithName(const char *pszTimerName, NSObject *pInstance);
|
||||
static void releaseTimer(CCProfilingTimer *pTimer);
|
||||
|
||||
|
|
Loading…
Reference in New Issue