Getting current time in milliseconds Cocos2d

后端 未结 5 2029
误落风尘
误落风尘 2021-01-06 08:32

I\'ve tried to google around but I still can\'t find the best answer.

All I want is very simple, I just want to get the current time in milliseconds.

How can

5条回答
  •  自闭症患者
    2021-01-06 08:57

    Take the current time in seconds and multiply by 1000 go get number of milliseconds:

    double ms = CFAbsoluteTimeGetCurrent() * 1000.0;    
    

提交回复
热议问题