2012.10.13 周六
来源:互联网 发布:怎么查询80端口被占用 编辑:程序博客网 时间:2024/05/01 21:05
安装VS2010的MSDN
参考链接:http://www.cnblogs.com/lyj/archive/2010/06/01/vs2010-setup-zh-cn-msdn.html
打开Microsoft Visual Studio 2010开始菜单里Visual Studio Tools里的Manage Help Settings - ENU。
我们从磁盘安装内容,选择cn_visual_studio_2010_ultimate_x86_dvd_532347.iso里面ProductDocumentation文件夹的HelpContentSetup.msha文件。如果你没有中文版iso也可以选择联机安装内容,在线安装MSDN中英文文档。
VC获取系统时间和运行时间
1.使用CTime类
CString str;
CTime tm;
tm=CTime::GetCurrentTime(); //获取系统时间
str=tm.Format("现在时间是%Y年%m月%d日 %X");
2: 得到系统时间日期(使用GetLocalTime)
SYSTEMTIME st;
CString strDate,strTime;
GetLocalTime(&st);
strDate.Format("%4d-%2d-%2d",st.wYear,st.wMonth,st.wDay);
strTime.Format("%2d:%2d:%2d",st.wHour,st.wMinute,st.wSecond);
3.使用GetTickCount
//获取程序运行时间
long t1=GetTickCount();//程序段开始前取得系统运行时间(ms)
Sleep(500);
long t2=GetTickCount();();//程序段结束后取得系统运行时间(ms)
str.Format("time:%dms",t2-t1);//前后之差即 程序运行时间
AfxMessageBox(str);
//获取系统运行时间
long t=GetTickCount();
CString str,str1;
str1.Format("系统已运行 %d时",t/3600000);
str=str1;
t%=3600000;
str1.Format("%d分",t/60000);
str+=str1;
t%=60000;
str1.Format("%d秒",t/1000);
str+=str1;
AfxMessageBox(str);
4
time_t m = time(NULL);
t= localtime( &m );
获得1900年到现在,得时间间隔,最小秒。
tm_sec
Seconds after minute (0 – 59)
tm_min
Minutes after hour (0 – 59)
tm_hour
Hours after midnight (0 – 23)
tm_mday
Day of month (1 – 31)
tm_mon
Month (0 – 11; January = 0)
tm_year
Year (current year minus 1900)
tm_wday
Day of week (0 – 6; Sunday = 0)
tm_yday
Day of year (0 – 365; January 1 = 0)
tm_isdst //夏令时
Positive value if daylight saving time is in effect; 0 if daylight saving time is not in effect; negative value if status of daylight saving time is unknown. The C run-time library assumes the United States’s rules for implementing the calculation of Daylight Saving Time (DST).
5,gmtime 同localtime但显示的是世界时间
- 2012.10.13 周六
- 2012.10.20 周六
- 周六
- 周六
- 周六
- 周六
- 2014.09.13 周六-html-xhtml-正则表达式-html总结-css
- 4.23 周六
- 周六加班
- 周六喂鱼记
- 关于周六
- 周六小聚
- 0531周六
- 0614周六
- 0906周六
- 周六一日游!
- 090411周六
- 0425周六
- 12306验证码识别 的结果记录
- Free Apache Tomcat Hosting in the Cloud for Java Applications? It's Called OpenShift!
- 2012.10.12 周五
- 河南信阳金牛山办事处因征地与村民起流血冲突-征地-流血冲突
- 骑行青海湖
- 2012.10.13 周六
- 关于configure中的build/host/target
- find 、 grep 命令
- Swing-JComboBox
- 软件开发,维护与支持的困惑
- linux sock_raw原始套接字编程
- 各地少先队深入开展红领巾心向党主题教育-少先队-红领巾心向党-主题教育
- 关于X86下函数调用栈的问题
- struts2 跟踪用户状态session