> 英语 >
求任意日期到 1970年1月1日0点0分的秒数的算法.例如:计算2011-1-1日12点28分10秒到970年1月1日0点0分秒
不修改系统时间,time()总是取得当前时间到1970年1月1日0点0分的秒数,现在是要求任意时间! 谢谢 各位大侠!
人气:362 ℃ 时间:2020-06-09 05:57:26
解答
用difftime()和mktime()配合使用mktime()函数原型time_t __cdecl mktime(struct tm *)tm是个struct,定义是struct tm {int tm_sec; /* seconds after the minute - [0,59] */int tm_min; /* minutes after the hour -...
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版