Chas. Owens wrote:
On Thu, Mar 20, 2008 at 9:15 AM, Sharan Basappa
<[EMAIL PROTECTED]> wrote:
Thanks, this is really helpful. In addition, is there a way to print
 the cpu cycles taken from *ux command prompt?
 I have worked with tools that, at the end of their job, print out the
 cpu cycles it took for them.
 I would assume that they use some command from *ux to do this.
snip

The time command in UNIX will give you the amount of time the program
took to run, the amount of cpu time the program took to run, and the
amount of time spent on system overhead:

time ./q.pl

real    0m0.013s
user    0m0.007s
sys     0m0.006s

Or you could use the times() function built in to Perl.

perldoc -f times


John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to