没找到合适的函数化返回毫秒时间戳的方法,用其他的凑合下。
#include <stdio.h>
#include <time.h>
#include <Windows.h>
int main()
{
SYSTEMTIME t;
GetSystemTime(&t); // or GetLocalTime(&t)
printf("The system time is: %02d:%02d:%02d.%03d\n",
t.wHour+8, t.wMinute, t.wSecond, t.wMilliseconds);
return 0;
}
虽然不是毫秒时间戳,也够用了。