如何计算gcc编译时间? [英] How to calculate gcc compilation time?
本文介绍了如何计算gcc编译时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道GCC的编译时间. GCC是否有任何用于计算编译时间的命令或选项?
I want to know GCC compile time. Does GCC have any command or option for calculate compile time?
我有一个名为hello.c的文件,并将对其进行编译.我想知道编译所花费的时间.
I have a file named hello.c and will compile it. I want to know the time spent to compile it.
推荐答案
您可以使用time
实用程序:
$ time gcc -c hello.c
real 0m0.224s
user 0m0.013s
sys 0m0.010s
这是链接到手册页的链接.
这篇关于如何计算gcc编译时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文