no message

master
zcy 2022-03-29 23:51:51 +08:00
parent 74bfec54d5
commit d42d5f1330
2 changed files with 4 additions and 2 deletions

View File

@ -233,7 +233,7 @@ int CProcessMonitor::StartLog(uint64_t milisecond){
WORD wSecond = stTime.wSecond;
CString m_date;
//m_date字符串即为当前时间。如2010年4月23日 11:12:45
m_date.Format("%4d年%2d月%2d日 %2d:%2d:%2d", wYear, wMonth, wDay, wHour, wMinute, wSecond);
m_date.Format("%4d-%2d-%2d %2d:%2d:%2d", wYear, wMonth, wDay, wHour, wMinute, wSecond);
USES_CONVERSION;
std::string strS(m_date); //CString-->std::string
ProcessStatus *p = new ProcessStatus;

View File

@ -13,8 +13,10 @@ int main(int argc,char **argv){
usage1.GetMemoryUsage(&pmem,&vmem);
std::cout<<"cpu usage is "<< usage1.GetCpuUsage() << " "<<pmem <<
"byte "<< vmem <<"byte seq "<< usage1.m_logs.size() << std::endl;
Sleep(1000);
for(auto itr = usage1.m_logs.begin();itr != usage1.m_logs.end();itr++){
std::cout<<(*itr)->time<<" "<<(*itr)->cpu;
}
}
}