I am looking for a method in which i can convert a String to datetime object. I see cocos2d-X dosent contain a NSDate class. Can anyone please help me ?
Kind Regards
I am looking for a method in which i can convert a String to datetime object. I see cocos2d-X dosent contain a NSDate class. Can anyone please help me ?
Kind Regards
You can try CCTime. There is a function in CCTime gettimeofdayCocos2d()
struct cc_timeval begin;
virtual float GetElapsedTime(){
struct cc_timeval now;
CCTime::gettimeofdayCocos2d(&now,NULL);
return CCTime::timersubCocos2d(&begin,&now)/1000;
}