利用wxTimer动态输出当前系统时间

timer.h































timer.cpp




























//中国时区GMT+8,常数为A_WST
nowTime=now.Format("%c", wxDateTime::A_WST).c_str();
//动态在控制台输出当前时间
std::cout << nowTime << std::endl;
}
Timer::Timer() : wxFrame((wxWindow *)NULL, wxID_ANY, _T("")), m_timer(this)
{
//时间间隔1秒
m_timer.Start(1000);
}









