验证中...
Languages: C/C++
Categories: 桌面应用界面
Latest update 2019-05-13 13:54
gistfile1.txt
Raw Copy
std::time_t getTimeStamp()
{
std::chrono::time_point<std::chrono::system_clock,std::chrono::milliseconds> tp = std::chrono::time_point_cast<std::chrono::milliseconds>(std::chrono::system_clock::now());
auto tmp=std::chrono::duration_cast<std::chrono::milliseconds>(tp.time_since_epoch());
std::time_t timestamp = tmp.count();
//std::time_t timestamp = std::chrono::system_clock::to_time_t(tp);
return timestamp;
}

Comment list( 0 )

You need to Sign in for post a comment

Help Search