Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 04-07-2005, 05:09 AM   #1
Registered: Sep 2003
Posts: 103

Rep: Reputation: 15
how can I measure how much real time is used to run an executable?


Basically I want to see how long it takes my executable to run with different parameters used in one of the algorithms. Is there a way to e.g. submit it to the background (I can do this) AND set a timer going which will stop when the executable finishes running?

I dont want to sit with a stopwatch watching...


Old 04-07-2005, 05:41 AM   #2
Senior Member
Registered: Dec 2004
Distribution: Slackware, ROCK
Posts: 1,973

Rep: Reputation: 46
you mean like the time command?

$time { slocate glib.h; }

real 0m1.025s
user 0m0.080s
sys 0m0.010s


note that the semicolon in the above command is not a typo.
you can also chain commands together like:

time { xxx && xxx && xxxx && xxxx; }


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I somehow accurately measure the time a operation takes? Like 'unzip -x'? brynjarh Linux - Newbie 9 08-18-2004 10:26 PM
How to measure the time to build a package? mullog Linux From Scratch 10 05-11-2004 12:23 PM
accurately measure time rasselin Programming 1 09-05-2003 06:18 PM
how to accurately measure processing time rasselin Programming 3 09-01-2003 12:45 PM
run real time echox Programming 3 04-03-2003 03:01 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:41 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