C/C++要借助timeval,cocos2dx下试用有效

[cpp] view plaincopy  
  1. long getCurrentTime()    
  2. {    
  3.    struct timeval tv;    
  4.    gettimeofday(&tv,NULL);    
  5.    return tv.tv_sec * 1000 + tv.tv_usec / 1000;    

相关文章: