On my iBook running OS 9.1 and MacPerl 5.6.1b the following code...
if($] > 5.006) {
require Time::HiRes;
Time::HiRes->import('gettimeofday');
}
($seconds, $microseconds) = gettimeofday;
print "Seconds = $seconds Microseconds = $microseconds\n\n";
yields...
Seconds = gettimeofday Microseconds =
When I insert the full quoted path to "Hires" after "require" in the second
line of this example I get the same results.
Using the above method in a script does allow me to run it on MacPerl
5.2.0r4 without getting the error message "# Can't locate Time/HiRes.pm in
@INC".
The following code on 5.6.1b...
if($] > 5.006) { use Time::HiRes qw(gettimeofday) }
($seconds, $microseconds) = gettimeofday;
print "Seconds = $seconds Microseconds = $microseconds\n\n";
yields...
Seconds = 3091028777 Microseconds = 635666
David Seay
http://www.mastercall.com/g-s/