On Wed, 20 Dec 2000, Seby wrote:
> From were can i get....... accustamp
>
> Thankyou......
Charles has already said you can get it from daemontools-0.53 (or
less). However, I've got one in perl if you'd like. It works under
Solaris and Linux.
You'll need to have run h2ph on the /usr/include/* files for it to
work.
--
Regards
Peter
----------
Peter Samuel [EMAIL PROTECTED]
http://www.e-smith.org (development) http://www.e-smith.com (corporate)
Phone: +1 613 368 4398 Fax: +1 613 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada
"If you kill all your unhappy customers, you'll only have happy ones left"
###########################################################################
#!/pkgs/bin/perl
#
# Return the time as accurately as possible using the gettimeofday()
# system call.
#
require 'sys/syscall.ph';
while(<STDIN>)
{
print &accustamp, " $_";
}
sub accustamp
{
my($tv, $secs, $usecs);
# allocate sufficient space for the tv struct
$tv = pack("LI", 0, 0);
syscall(&SYS_gettimeofday, $tv, 0);
($secs, $usecs) = unpack("LI", $tv);
return $secs + $usecs / 1E6;
}