void gettime()
{
time_t rawtime;
struct tm* ptminfo;
time(&rawtime);
ptminfo = localtime(&rawtime);
printf("current: %02d-%02d-%02d %02d:%02d:%02d\n",
ptminfo->tm_year + 1900, ptminfo->tm_mon + 1, ptminfo->tm_mday,
ptminfo->tm_hour, ptminfo->tm_min, ptminfo->tm_sec);
}
void GetComputerTime()
{
LPSYSTEMTIME p_st = (LPSYSTEMTIME)malloc(sizeof(SYSTEMTIME));
GetLocalTime(p_st);
cout << "现在时间:" << p_st->wYear << "/" << p_st->wMonth << "/" << p_st->wDay << " "
<< p_st->wHour << ":" << p_st->wMinute << ":" << p_st->wSecond << endl;
//printf("%d:%d:%d\n", p_st->wHour, p_st->wMinute, p_st->wSecond);
free(p_st);
}