1. 包含头文件
#include <stdio.h>
#include <sys/timeb.h>
2. 代码
timeb t1;
ftime(&t1);
cout << t1.time * 1000 + t1.millitm;
#include <stdio.h>
#include <sys/time.h>
4. 代码段
struct timeval tv;
gettimeofday(&tv,NULL);
return tv.tv_sec * 1000 + tv.tv_usec / 1000;
5. int 转 string
char a[6];//把int 型的分数转换成string型的 然后set
snprintf(a, 6, "%d",tempScore);