Cocos2dx:获取系统毫秒时间

在CCTime中,存在接口gettimeofdayCocos2d:

class CC_DLL CCTime
{
public:
    static int gettimeofdayCocos2d(struct cc_timeval *tp,void *tzp);
    static double timersubCocos2d(struct cc_timeval *start,struct cc_timeval *end);
};

我们调用接口获取时间,但是这个时间只有秒和微妙,就需要我们自己进行装换了:
int getCurrentTime()
{
    struct cc_timeval Now;
    CCTime::gettimeofdayCocos2d(&Now,NULL);

    return Now.tv_sec * 1000 + Now.tv_usec / 1000;
}

相关文章

    本文实践自 RayWenderlich、Ali Hafizji 的文章《...
Cocos-code-ide使用入门学习地点:杭州滨江邮箱:appdevzw@1...
第一次開始用手游引擎挺激动!!!进入正题。下载资源1:从C...
    Cocos2d-x是一款强大的基于OpenGLES的跨平台游戏开发...
1.  来源 QuickV3sample项目中的2048样例游戏,以及最近《...
   Cocos2d-x3.x已经支持使用CMake来进行构建了,这里尝试...