Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-03-2004, 03:58 PM   #1
Registered: Oct 2003
Location: Ireland
Distribution: Slackware 9.1, Ubuntu
Posts: 192

Rep: Reputation: 30
Finding out how long a program takes to execute

Is there any command in Linux that I can use to measure the execution time (in milli or micro seconds) of a program?
Old 11-03-2004, 04:00 PM   #2
Registered: Jul 2003
Location: Göteborg
Distribution: Arch Linux (current)
Posts: 553

Rep: Reputation: 31
Old 11-03-2004, 05:31 PM   #3
Registered: Jul 2004
Location: Palo Alto, CA
Distribution: #! Korora
Posts: 472

Rep: Reputation: 30
You want time outside or inside the program?

If inside, read the docs for whatever programming
language you're using. I know there are docs for
g77, gcc, and g++. I don't know what programming
languge you are using. For example, in fortran,
you define an array, say INTEGER tick(2), then
use etime, dtime, or wahtever to find the time
of a particular program section. I'm sure there are
similiar stuffs for other languages.

If outside, use a script w/ time before and after
the program, i.e.,

<your program>



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
transcode takes too long xgreen Slackware 2 05-08-2005 08:54 AM
Booting up takes SO long! GreaseMonkey87 Linux - General 6 07-15-2004 02:28 AM
booting takes too long eye Red Hat 5 10-22-2003 01:26 PM
John the ripper takes too long Donboy Linux - Security 4 10-17-2003 04:48 PM
sendmail takes too long to come up ... t0dd Linux - Software 1 03-11-2002 02:59 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:58 PM.

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