头文件:
#include <chrono>
#define TIME_TYPE std::chrono::high_resolution_clock::time_point
#define TIME_NOW std::chrono::high_resolution_clock::now()
#define INVALID_TIME std::chrono::high_resolution_clock::time_point()
计算两个时间差:
TIME_TYPE here= TIME_NOW();
todo...
TIME_TYPE now= TIME_NOW();
now-here格式化成int后除以1000得毫秒