tags:

views:

70

answers:

1

Hi Guys

I what know gcc compile time. gcc have any command or option for calculate compile time?

[example] I have file hello.c and then compile.I what know spent time to compile

+7  A: 

You can use the time utility:

$ time gcc -c hello.c

real    0m0.224s
user    0m0.013s
sys     0m0.010s

Here's a link to the man page.

Carl Norum
does the difference in time indicate wait state of process?real = user + sys + time (process waiting for CPU).trying to understand if there is another factor to it ?
Gollum
sys time is just how much time is spent in system calls. You want to use "real" time if you want to know how long the whole process took.
jer