C++官网参考链接:https://cplusplus.com/reference/ctime/
头文件
C时间库
此头文件包含用于获取和操作日期和时间信息的函数定义。
函数
时间操作
clock Clock program (function)
difftime Return difference between two times (function)
mktime Convert tm structure to time_t (function)
time Get current time (function)
转换
asctime Convert tm structure to string (function)
ctime Convert time_t value to string (function)
gmtime Convert time_t to tm as UTC time (function)
localtime Convert time_t to tm as local time (function)
strftime Format time as string (function)
宏常量
CLOCKS_PER_SEC Clock ticks per second (macro)
NULL Null pointer (macro)
类型
clock_t Clock type (type)
size_t Unsigned integral type (type)
time_t Time type (type)
struct tm Time structure (type)