[Shootout-list] Timing resolution? libbsd-resource-perl

Isaac Gouy igouy2@yahoo.com
Tue, 10 Aug 2004 08:41:15 -0700 (PDT)


--- Brent Fulgham <bfulg@pacbell.net> wrote:

> On Sat, Aug 07, 2004 at 08:48:49AM -0700, Isaac Gouy wrote:
> > Is it possible to increase the timing resolution on the test
> > machine using libbsd-resource-perl?
> 
> I'm trying it now.  Will report back later.

Apparently: 

       The BSD::Resource module offers a times() implementation
       that has usually slightly better time granularity than the
       times() by Perl core.  The time granularity of the latter
       is usually 1/60 seconds while the former may achieve sub-
       milliseconds.

       NOTE: The current implementation uses two getrusage() sys-
       tem calls: one with RUSAGE_SELF and one with RUSAGE_CHIL-
       DREN.  Therefore the operation is not `atomic': the times
       for the children are recorded a little bit later.

I guess even with BSD::Resource we shouldn't expect too much of times() 


	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail