#include <iostream>
#include <string
CF 机器作弊行为严重限制机器登录怎么办?
CF 机器作弊限制登录x分钟怎么办?
全新讲解仔细看你也会! (温馨提示 先全屏播放 然后画质调到720P )
SAkcOCMVK
void Run()
{
for (int i = 0; i < 1000000000; ++i)
{
}
}
int main()
{
auto beforeTime = std::chrono::steady_clock::now();
Run();
auto afterTime = std::chrono::steady_clock::now();
std::cout << "总耗时:" << std::endl;
//秒
double duration_second = std::chrono::duration<double>(afterTime - beforeTime).count();
std::cout << duration_second << "秒" << std::endl;
//毫秒级
double duration_millsecond = std::chrono::duration<double, std::milli>(afterTime - beforeTime).count();
std::cout << duration_millsecond << "毫秒" << std::endl;
//微妙级
double duration_microsecond = std::chrono::duration<double, std::micro>(afterTime - beforeTime).count();
std::cout << duration_microsecond << "微秒" << std::endl;
//纳秒级
double duration_nanosecond = std::chrono::duration<double, std::nano>(afterTime - beforeTime).count();
std::cout << duration_nanosecond << "纳秒" << std::endl;
getchar();
return 0;
}
————————————————