//Visual Studio C++ 编译通过
#include<iostream>
#include<ctime>
int main()
{
std::time_t t = std::time(0); // t在32为是long型,在64位是 long long型
std::cout << t << " seconds since 01-Jan-1970\n";
return 0;
}
运行结果:
1654986565 seconds since 01-Jan-1970