🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.perl
Article #642

Re: Execution time in Perl

#642
From: chds652
Date: Thu, 30 Oct 1997 08:51
22 lines
1532 bytes
cjz wrote:

> Hello,
> I am trying to find a way to time the execution of a script.  At this
> time I have implemented something very simple that grabs the "time" in
> seconds at the start of the scripts and grabs it again at the end,
> compares them and prints out the time in seconds.
>
> I am looking for a way to measure the execution time more accurately,
> say in 10ths, 100ths, 1000ths etc. of a second.  Please help.
>
> Thanks,
>
> -Eddy

Use the "times" function built into Perl.  This function can obtain user
time, system time, child time, and children's system time.

Format:
($user, $system, $cuser, $csystem) = times;

chds652@botcc.com
Technical Details
Message-ID: <34584A86.CCC605B2@botcc.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!agh.edu.pl!polsl.gliwice.pl!uucp-gw.cyf.gov.pl!news.icm.edu.pl!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-peer.sprintlink.net!news-pull.sprintlink.net!news-in-east.sprintlink.net!news.sprintlink.net!Sprint!207.208.45.33!newsfeeds.interaccess.com!not-for-mail
References: <3457712D.D21178F7@interramp.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!agh.edu.pl!polsl.gliwice.pl!uucp-gw.cyf.gov.pl!news.icm.edu.pl!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-peer.sprintlink.net!news-pull.sprintlink.net!news-in-east.sprintlink.net!news.sprintlink.net!Sprint!207.208.45.33!newsfeeds.interaccess.com!not-for-mail
From: chds652 <chds652@botcc.com>
Newsgroups: comp.lang.perl.misc,pl.comp.lang.perl,comp.lang.perl
Subject: Re: Execution time in Perl
Date: Thu, 30 Oct 1997 02:51:18 -0600
Organization: InterAccess Co., Chicago's Full Service Internet Provider
Lines: 23
Message-ID: <34584A86.CCC605B2@botcc.com>
References: <3457712D.D21178F7@interramp.com>
NNTP-Posting-Host: 207.208.102.139
Mime-Version: 1.0
X-Mailer: Mozilla 4.03 [en] (X11; I; Linux 2.0.30 i486)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit