On Fri, Apr 15, 2005 at 02:47:26PM -0400, Matt Frye wrote: > ...and so on and let's say it deletes a billion files. What's an > effective way of timing the whole thing? This needs to be > ultra-portable so not using any modules is a plus. I started with... > > ($exectime) = times; > > ...but I'm not sure that's giving me what I need. I tested up to 7500 > files and ne'er more than .01 so I want to make sure I'm getting real > data.
Easiest way is like so:
my $startTime = time;
while(glob('./*/Recent/*')){unlink $_}
print time - $startTime,"\n";
You may want to look into Time::HiRes if you need greater accuracy then
seconds.
--
ICQ: 116080581 | Jabber: [EMAIL PROTECTED]
AIM/Y!: AzhrarnLOD | IRC: Azhrarn @ irc.chatspike.net
( Vim, Tabs, BSD Braces, Debian, and Perl )
signature.asc
Description: Digital signature
-- TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug TriLUG Organizational FAQ : http://trilug.org/faq/ TriLUG Member Services FAQ : http://members.trilug.org/services_faq/ TriLUG PGP Keyring : http://trilug.org/~chrish/trilug.asc
