我是靠谱客的博主 追寻蛋挞,这篇文章主要介绍How to get the current time in milliseconds in C Programming?,现在分享给大家,希望可以做个参考。

http://stackoverflow.com/questions/8558625/how-to-get-the-current-time-in-milliseconds-in-c-programming
#include<stdio.h>
#include<time.h>
int main()
{
clock_t t1, t2;
t1 = clock();
int i;
for(i = 0;i < 1000000 ;i++)
{
int x = 90;
}
t2 = clock();
float diff = (((float)t2 - (float)t1) / 1000000.0F ) * 1000;
printf("%f",diff);
return 0;
}

最后

以上就是追寻蛋挞最近收集整理的关于How to get the current time in milliseconds in C Programming?的全部内容,更多相关How内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(51)

评论列表共有 0 条评论

立即
投稿
返回
顶部