difftime, _difftime32, _difftime64

timer1

Ending time.

timer0

Beginning time.

difftime returns the elapsed time in seconds, from timer0 to timer1. The value returned is a double precision floating-point number. The return value may be 0, indicating an error.

The difftime function computes the difference between the two supplied time values timer0 and timer1.

The time value supplied must fit within the range of time_t. time_t is a 64-bit value. Thus, the end of the range was extended from 03:14:07 January 19, 2038 to 23:59:59, December 31, 3000. The lower range of time_t is still midnight, January 1, 1970.

difftime is an inline function that evaluates to either _difftime32 or _difftime64 depending on whether _USE_32BIT_TIME_T is defined. _difftime32 and _difftime64 can be used directly to force the use of a particular size of the time type.

These functions validate their parameters. If either of the parameters is zero or negative, the invalid parameter handler is invoked, as described in Parameter Validation. If execution is allowed to continue, these functions return 0 and set errno to EINVAL.

 

详情见:http://msdn.microsoft.com/zh-cn/library/3wbd7281.aspx?appId=Dev10IDEF1&l=ZH-CN&k=k(

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值