`
xpp02
  • 浏览: 1006959 次
社区版块
存档分类
最新评论

时间管理说明(Time Management)

 
阅读更多

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 the TZ 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 structtm 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 type struct__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.

NoteNote:

In all versions of Microsoft C/C++ except Microsoft C/C++ version 7.0, and in all versions of Microsoft Visual C++ 2005, the time 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.

NoteNote:

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_tby default, but defining _USE_32BIT_TIME_T changes time_t to __time32_t and forces many time functions to call versions that take the 32-bit time_t. For more information, see Standard Types and comments in the documentation for the individual time functions.


分享到:
评论

相关推荐

    商店销售管理系统课程设计.doc

    故开发 "商品销售管理系统",这对企业的发展至关重要,也节省了大量时间,从而提高了销售的 运转效率。商品销售管理系统可以实现企业商品管理的网络化,信息化,现代化,可以 有效的提高企业商品的管理效率,节约了...

    酒店客房管理系统源码java-hotel-management:基于javaSwing的酒店管理系统

    useUnicode=true&characterEncoding=utf8&serverTimezone=UTC username=root password=123456 # 初始化连接数量 initialSize=5 # 最大连接数 maxActive=10 # 最大等待时间 maxWait=3000 注意:如果是保持数据库连接...

    操作系统课程设计-时间片轮转算法java实现.doc

    编写课程设计说明书。 " "工作量要求:完成以上设计要求中的所有算法功能。 " "四、工作进度安排 " "周一:布置、讲解题目,收集资料; " "周二:系统分析,算法设计; " "周三:编制、调试程序; " "周四:测试系统...

    Oracle9i的init.ora参数中文说明

    说明: 指定一对值 (UTC,TZD), 设置 TIME WITH TIME ZONE 数据类型的默认值, 该数据类型包含 HOUR, MINUTE, SECOND, TIMEZONE_HOUR 和 TIMEZONE_MINUTE 这几个日期时间字段。UTC 是世界时而 TZD 是当地时区。 语法: ...

    网络游戏交易平台信息管理系统--毕业设计.doc

    有的却长时间的闲置,完全 发挥不出其真正的价值。为了充分发挥游戏内各个物品的价值,游戏交易系统的出现已 然成为时代的趋势,并将会拥有其与众不同又必不可少的的地位。 设计本系统的目的在于创建一个可以帮助...

    开放实验室实验预约系统

    在排课子系统中,老师根据管理员发放的实验项目批次,确定实验的时间、地点、容纳人数等基本信息,同时老师可以查看自己排课情况。在选课子系统中,学生根据自己的实际情况和老师排课的基本情况来选择自己的实验项目...

    高清监控系统兼容所有网络摄像机

    Time Setting=时间设置 Focus Helper=调焦辅助 ;系统维护页面 Update method:=系统升级: Select...=浏览... Progress:=升级进度: Update begin=升级 Cancel=取消 Restart=重启设备 Recovery=恢复系统 WEB Update=...

    基于Android的茶叶销售平台设计与实现毕业作品.doc

    报表查询模块是用户根据自己的需求选择时间段查看 报表。库存管理模块是用户可以对库存信息进行添加、删除、修改、查询,从而实现库 存管理。销售评比模块是根据销售额进行评比,分为全国排行和店内排行,即分别是各...

    操作系统(内存管理)

    本节将向您展示 malloc 和 free 的一个最简化实现的代码,来帮助说明管理内存时都涉及到了哪些事情。 要试着运行这些示例,需要先 复制本代码清单,并将其粘贴到一个名为 malloc.c 的文件中。接下来,我将一次一个...

    Dell服务器BIOS设置.docx

    选项 说明 System Time(系统时间) 设置系统内部时钟的时间。 System Date(系统日期) 设置系统内部日历的日期。 Memory Settings(内存设置) 显示与安装的内存相关的信息。请参阅Memory Settings(内存设置)...

    pomodoro_timer:Pomodoro技术是一种时间管理方法,该方法使用计时器将您的工作分解为多个间隔,通常为25分钟,以短时间隔分隔。 试试看!

    Pomodoro技术是Francesco Cirillo在1980年代后期开发的一种时间管理方法。 该技术使用计时器将工作分解为多个间隔,通常为25分钟,以短时间隔分隔。 在Cirillo用作大学生的番茄形厨房计时器之后,每个间隔都被称为...

    asp在线考试系统(asp+access实现)

    需要说明的是strid1变量的最后是一个逗号,在下一个文件中会详细说明如何进行处理。 在线考试系统的实现 摘要:人类已经步入了崭新的21世纪,以Internet技术为代表的信息技术为人类创造了一种新的不受地域、...

    ASP设计在线考试系统OnlineTest

    需要说明的是strid1变量的最后是一个逗号,在下一个文件中会详细说明如何进行处理。 在线考试系统的实现 摘要:人类已经步入了崭新的21世纪,以Internet技术为代表的信息技术为人类创造了一种新的不受地域、...

    数据库发展史(毕业论文中英文翻译)

    数据库技术从诞生到现在,在不到半个世纪的时间里,形成了坚实的理论基础、成熟的商业产品和广泛的应用领域,吸引越来越多的研究者加入。数据库的诞生和发展给计算机信息管理带来了一场巨大的革命。三十多年来,国内...

    Dell服务器BIOS设置完整版.docx

    选项 说明 System Time(系统时间) 设置系统内部时钟的时间。 System Date(系统日期) 设置系统内部日历的日期。 Memory Settings(内存设置) 显示与安装的内存相关的信息。请参阅。 Processor Settings(处理器...

    音乐网站的设计与实现【毕业作品】.doc

    35 附录3:作品说明书 36 摘 要 随着人们物资文化生活水平的不断提高,人们对精神文化生活的要求也越来越高,这 样越来越多的歌曲,明星就走进了平常人的生活,这些人们只能选择周末或者节假日抽 一些时间通过各种...

    BIOS中英文对照表

    Time/System Time 时间/系统时间 Date/System Date 日期/系统日期 Level 2 Cache 二级缓存 System Memory 系统内存 Video Controller 视频控制器 Panel Type 液晶屏型号 Audio Controller 音频控制器 Modem ...

    Activiti6.0教程例子下载

    6. ManagementService: ManagementService提供了对Activiti流程引擎的管理和维护功能,这些功能不在工作流驱动的应用程序中使用,主要用于Activiti系统的日常维护。 7. HistoryService: HistoryService用于获取正在...

    ORACLE大表分区

    1.分区相关脚本部署执行顺序,安装前请确保该用户拥有管理员权限, 同时请执行GRANT CREATE ANY TABLE TO DBUSER, 因为使用到了动态的CREATE TABLE语句; 01) >AGGRE_ERROR_INFO_DDL.SQL 如果日志表AGGRE_ERROR_INFO...

Global site tag (gtag.js) - Google Analytics