LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-02-2008, 07:35 AM   #1
Sanjib_Sur
LQ Newbie
 
Registered: Oct 2008
Posts: 13

Rep: Reputation: 0
Lightbulb Execution Time


Hi, everyone..
Can anybody know how to get the execution time of a program under gcc compiler in Fedora8?
Thnxx in advance..
 
Old 12-02-2008, 08:01 AM   #2
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by Sanjib_Sur View Post
Can anybody know how to get the execution time of a program under gcc compiler in Fedora8?
If you run your program using the "time" program, it will display the time it took for the program to run. For example:
Code:
[machine:~]:time ls -al >> /dev/null

real    0m0.045s
user    0m0.016s
sys     0m0.028s
 
Old 12-02-2008, 08:07 AM   #3
Sanjib_Sur
LQ Newbie
 
Registered: Oct 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
If you run your program using the "time" program, it will display the time it took for the program to run. For example:
Code:
[machine:~]:time ls -al >> /dev/null

real 0m0.045s
user 0m0.016s
sys 0m0.028s
My question is where to write the code?
under the program itself or in the bash command line?
and my program is under C not C++...
 
Old 12-02-2008, 01:20 PM   #4
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by Sanjib_Sur View Post
My question is where to write the code?
What code?
Quote:
Originally Posted by Sanjib_Sur View Post
under the program itself or in the bash command line?
Please give us more detail about what you are trying to do. I do not understand what your goal is. If my previous post did not help you, we need more detail before we can help you.
Quote:
Originally Posted by Sanjib_Sur View Post
and my program is under C not C++...
That should not matter.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
compute execution time raedbenz Linux - Software 2 07-15-2008 12:26 PM
how to find the time of execution anandkj Linux - Newbie 2 12-20-2007 02:27 AM
I want to know the program execution time daggulasreedhar Programming 6 03-15-2007 04:07 AM
commnad time execution caprianking2002 Linux - General 2 06-27-2006 03:01 AM
how to [time] the execution hq4ever Linux - General 8 07-03-2004 04:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration