how to find the compilation time at C????

Discussion in 'C' started by vignesh1988i, Jan 6, 2010.

  1. vignesh1988i

    vignesh1988i Banned

    Joined:
    Sep 19, 2009
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Chennai
    how to find out the time complexity or compilation time in a C program?????? help me out :):thinking:
     
  2. karthigayan

    karthigayan New Member

    Joined:
    Feb 19, 2010
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    0
    If you need compilation time of the C program you can use the time command in linux environment .

    time cc testing.c

    But inside a program we can only get the run time by some of the time calculations.We can not get the compilation time.
     
  3. vignesh1988i

    vignesh1988i Banned

    Joined:
    Sep 19, 2009
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Chennai
    oh... ok .ok :) i just need the time in milli or microseconds..... . whether ur command willl dispaly in this format?????? :)
     
  4. karthigayan

    karthigayan New Member

    Joined:
    Feb 19, 2010
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    0
    time will give its output in seconds and micro seconds . It will give three kind of times real,user,system.Here the real time the execution time.user and system time depends on the kernal.

    real 0m0.003s
    user 0m0.000s
    sys 0m0.004s

    The code which I execute took lesser than 0 second.Which means in a few milli seconds .
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice