时间管理说明(Time Management)
来源:互联网 发布:尔雅网络课程注册网址 编辑:程序博客网 时间:2024/05/16 17:09
Use these functions to get the current time and convert, adjust, and store it as necessary. The current time is the system time.
The _ftime and localtime routines use theTZ environment variable. If TZ is not set, the run-time library attempts to use the time-zone information specified by the operating system. If this information is unavailable, these functions use the default value of PST8PDT. For more information on TZ, see _tzset; also see _daylight, timezone, and _tzname.
Function
Use
.NET Framework equivalent
asctime, _wasctime, asctime_s, _wasctime_s
Convert time from type struct tm to character string. The versions of these functions with the_s suffix are more secure.
System::DateTime::ToLongDateString, System::DateTime::ToLongTimeString, System::DateTime::ToShortDateString, System::DateTime::ToShortTimeString, System::DateTime::ToString
clock
Return elapsed CPU time for process.
Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.
ctime, _ctime32, _ctime64, _wctime, _wctime32, _wctime64, _ctime_s, _ctime32_s, _ctime64_s, _wctime_s, _wctime32_s, _wctime64_s
Convert time from type time_t, __time32_t or __time64_t to character string. The versions of these functions with the_s suffix are more secure.
System::DateTime::GetDateTimeFormats, System::DateTime::ToString, System::DateTime::ToLongTimeString, System::DateTime::ToShortTimeString
difftime, _difftime32, _difftime64
Compute difference between two times.
System::DateTime::Subtract
_ftime, _ftime32, _ftime64,_ftime_s, _ftime32_s, _ftime64_s
Store current system time in variable of type struct _timeb or typestruct__timeb64 The versions of these functions with the_s suffix are more secure.
System::DateTime::Now
_futime, _futime32, _futime64
Set modification time on open file
System::IO::File::SetLastAccessTime, System::IO::File::SetLastWriteTime, System::IO::File::SetCreationTime
gmtime, _gmtime32, _gmtime64, _gmtime_s, _gmtime32_s, _gmtime64_s
Convert time from type time_t to struct tm or from type __time64_t to struct tm.The versions of these functions with the _s suffix are more secure.
System::DateTime::UtcNow, System::DateTime::ToUniversalTime
localtime, _localtime32, _localtime64, localtime_s, _localtime32_s, _localtime64_s
Convert time from type time_t to struct tm or from type __time64_t to struct tmwith local correction. The versions of these functions with the _s suffix are more secure.
System::DateTime::ToLocalTime
_mkgmtime, _mkgmtime32, _mkgmtime64
Convert time to calendar value in Greenwich Mean Time.
System::DateTime::ToUniversalTime
mktime, _mktime32, _mktime64
Convert time to calendar value.
System::DateTime::DateTime
_strdate, _wstrdate, _strdate_s, _wstrdate_s
Return current system date as string. The versions of these functions with the_s suffix are more secure.
System::DateTime::Parse
strftime, wcsftime, _strftime_l, _wcsftime_l
Format date-and-time string for international use.
System::DateTime::ToLongDateString, System::DateTime::ToLongTimeString, System::DateTime::ToShortDateString, System::DateTime::ToShortTimeString, System::DateTime::ToString
_strtime, _wstrtime, _strtime_s, _wstrtime_s
Return current system time as string. The versions of these functions with the_s suffix are more secure.
System::DateTime::ToLongDateString, System::DateTime::ToLongTimeString, System::DateTime::ToShortDateString, System::DateTime::ToShortTimeString, System::DateTime::ToString
time, _time32, _time64
Get current system time as type time_t, __time32_t or as type__time64_t.
Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.
_tzset
Set external time variables from environment time variable TZ.
Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.
_utime, _utime32, _utime64, _wutime, _wutime32, _wutime64
Set modification time for specified file using either current time or time value stored in structure.
Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.
In all versions of Microsoft C/C++ except Microsoft C/C++ version 7.0, and in all versions of Microsoft Visual C++ 2005, thetime function returns the current time as the number of seconds elapsed since midnight on January 1, 1970. In Microsoft C/C++ version 7.0,time returned the current time as the number of seconds elapsed since midnight on December 31, 1899.
In versions of Visual C++ and Microsoft C/C++ before Visual C++ 2005, time_t was a long int (32 bits) and hence could not be used for dates past 3:14:07 January 19, 2038, UTC. In Visual C++ 2005,time_t is equivalent to __time64_t by default, but defining_USE_32BIT_TIME_T changes time_tto __time32_t and forces many time functions to call versions that take the 32-bittime_t. For more information, see Standard Types and comments in the documentation for the individual time functions.
- 时间管理说明(Time Management)
- 时间管理(Time Management)
- 时间管理(Time Management)
- 时间管理(Time Management)
- 信息技术下的时间管理(Information Technology Time Management)
- bzoj 1620: [Usaco2008 Nov]Time Management 时间管理(贪心)
- bzoj1620 [Usaco2008 Nov]Time Management 时间管理
- [BZOJ1620][Usaco2008 Nov]Time Management 时间管理
- 【Usaco2008Nov】【BZOJ1620】Time Management 时间管理
- [BZOJ1620][Usaco2008 Nov]Time Management 时间管理
- bzoj1620【Usaco2008 Nov】Time Management 时间管理
- BZOJ1620: [Usaco2008 Nov]Time Management 时间管理
- BZOJ 1620: [Usaco2008 Nov]Time Management 时间管理
- bzoj 1620: [Usaco2008 Nov]Time Management 时间管理
- BZOJ 1620: [Usaco2008 Nov]Time Management 时间管理
- 【BZOJ1630】【Usaco2008 Nov】【Time Management 时间管理】【贪心】
- Head First PMP – 6 – 时间管理(Time Management)
- BZOJ-1620- [Usaco2008 Nov]Time Management 时间管理
- Linux (FC16) 安装JDK及Tomcat6
- 使用MediaElement.js构建个性的HTML5音频和视频播放器
- BoneCP 学习笔记
- eclipse+MyEclipse 设置字符集方法
- 一个游戏程序员的学习资料
- 时间管理说明(Time Management)
- ofbiz的webservice接口提供(2)-数据类型的局限性
- ofbiz的webservice接口提供(4)-支持复杂数据类型方法
- 在OA 中应避免使用的PL/SQL语句
- lucene3.5程序
- ofbiz的webservice接口提供(3)-不规范的wsdl的客户端访问代码
- matlab画图标记
- spring security core哪里有
- 新手配置GVIM