C++打印当前时间(chrono)
作者:互联网
#include <chrono>
#include <iomanip>
#include <iostream>
std::chrono::system_clock::time_point t = std::chrono::system_clock::now(); std::time_t c = std::chrono::system_clock::to_time_t(t); cout << std::put_time(std::localtime(&c), "%F %T\n"); // 2022-02-22 20:50:30
标签:std,chrono,打印,system,C++,time,include,clock 来源: https://www.cnblogs.com/GEEK-ZHAO/p/15924918.html