The method of obtaining time
-
ctime library
Second only to statistics
for algorithm problem: After you let the program run 1000 times the average at the time, a few times or moreFor project code: 1000 times? come on!
We need to improve accuracy -
time library
-
windows.h: millisecond
std :: GetTickCount () -
windows.h: subtle level
LARGE_INTEGER tmp;
QueryPerformanceFrequency(&tmp);//QueryPerformanceFrequency()作用:返回硬件支持的高精度计数器的频率。
-
Linux platform: sys / time.h: milliseconds
struct timeval time ;