cocos2d-x 获取日期

前端之家收集整理的这篇文章主要介绍了cocos2d-x 获取日期前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
@H_502_0@struct timeval now; struct tm* time; gettimeofday(&now,NULL); time = localtime(&now.tv_sec); char date[32] = {0}; sprintf(date,"%d%02d%02d",(int)time->tm_year + 1900,(int)time->tm_mon + 1,(int)time->tm_mday); CCLog("%s",date); @H_502_0@ @H_502_0@系统毫秒数: @H_502_0@<span style="font-family: Arial,Helvetica,sans-serif;"><span style="white-space:pre"> </span> struct cc_timeval tv;</span> @H_502_0@<pre name="code" class="cpp"> CCTime::gettimeofdayCocos2d(&tv,NULL); cout<<tv.tv_sec * 1000 + tv.tv_usec / 1000 <<endl;

猜你在找的Cocos2d-x相关文章