摘要:
struct timeval{ long int tv_sec; // 秒数 同time(NULL) 的返回值 long int tv_usec; // 微秒数 10 的6次方 }; 1 struct timezone{ 2 int tz_minuteswest;/*格林威治时间往西方的时差*/ 3 int tz_dsttime;/*DST 时间的修... 阅读全文
摘要:
1 #include 2 #include 3 4 #pragma comment( lib,"winmm.lib" ) 5 6 int main() 7 { 8 DWORD msec = timeGetTime(); 9 std::cout << "msec = " << msec << std::endl; 10 11 return 0... 阅读全文
摘要:
ftime() 函数,这个函数是取系统的时间,精确到毫秒级别,它在windows 和linux 下都可用。所以我暂时是比较喜欢它的。 这个函数返回一个结构体,结构体中两个成员,其中time 成员,与函数 time(NULL) 返回的是等同的,用它可以配合localtime mktime ctime 阅读全文