在dev c ++中使用difftime函数如何在完成执行之前计算总时间 [英] using of function difftime in dev c++ how to calculate the total time before compleate the excution

查看:98
本文介绍了在dev c ++中使用difftime函数如何在完成执行之前计算总时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

time_t now_t,start_t;

时间(&start_t);

时间(&now_t);

dif = difftime(now_t,start_t);

如何计算excution之前的总时间.i表示驱动器中任何文件的副本.如何计算总时间和剩余时间.


谢谢

time_t now_t, start_t;

time(&start_t);

time(&now_t);

dif = difftime (now_t,start_t);

How to calculate Total time before the excution.i mean copy of any file in the drive .how to calculate total time & Remaining time.


Thanks

推荐答案

您可能会在中找到示例代码MSDN上的difftime文档 [ ^ ].


这篇关于在dev c ++中使用difftime函数如何在完成执行之前计算总时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆