1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 |
#include <time.h> #include <sys/timeb.h> #include <sstream> string getCurrentTime(){ long
long time_last; time_last = time (NULL); struct
timeb t1; ftime(&t1); time_t
ttt= t1.millitm+t1. time *1000; std::stringstream ss; ss << ttt; std::string ts = ss.str(); return
ts; } |
原文:http://www.cnblogs.com/justlikethat/p/3623504.html