long NetWorkManager::currentTimeNow()
{
struct cc_timeval now;
CCTime::gettimeofdayCocos2d(&now, NULL);
struct tm *tm;
tm = localtime(&now.tv_sec);
int year = tm->tm_year + 1900;
int month = tm->tm_mon + 1;
int day = tm->tm_mday;
int hour=tm->tm_hour;
int minute=tm->tm_min;
int second=tm->tm_sec;
long millSecond=now.tv_sec * 1000 + now.tv_usec / 1000;
std::stringstream currentTime;
currentTime<<year<<"-"<<month<<"-"<<day<<" "<<hour<<":"<<minute<<":"<<second<<" "<<millSecond;
CCLog("currentTime is %s ",currentTime.str().c_str());
return millSecond;
}