Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations JAE on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How long does my program take to run ?

Status
Not open for further replies.

lne

Aerospace
Joined
Feb 17, 2003
Messages
1
Location
DE
i need to know, in fractions of a second, how long my script/program takes to run. i've already tried the "time" and "date" commands, but i only get increments of whole seconds.

any suggestions would be most welcomed !
 
How about this script ? Let the program runs 500 times . Thus u can see the time .

#!/bin/sh
i=0
while [ $i -lt 500 ]
do
who >& /dev/null
i=`expr $i + 1`
done
exit 1
 
Sorry , this might be fit for you .

#!/bin/sh
i=0
while [ $i -lt 500 ]
do
./yourProgram
i=`expr $i + 1`
done
exit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top