取系统当前时间,有没有精确到毫秒的函数?
RT
[解决办法]
#include <time.h>
clock_t start=clock();
//...
clock_t end=clock();
unsigned int dis_time=end-start;
[解决办法]
#include <windows.h>
LARGE_INTEGER LargeInt;
QueryPerformanceFrequency(&LargeInt);
double Frequency = (double)LargeInt.QuadPart;
LONGLONG Start,End;
QueryPerformanceCounter((LARGE_INTEGER *)&Start);
//...
QueryPerformanceCounter((LARGE_INTEGER *)&End);
double Time = (End - Start)/Frequency;
[解决办法]
#include "windows.h "
int main()
{
SYSTEMTIME lTime;
GetLocalTime(&lTime);
return 0;
}
[解决办法]
struct timeval usex;
gettimeofday(&usex,NULL);