From d1308fa6352866f1664dba895fd3298f8eb8eebf Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Mon, 26 Apr 2004 14:40:10 +0000 Subject: Use HiRes timestamp in log - commented out for now however. Requires libtime-hires-perl or perl 5.8. --- Echolot/Log.pm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Echolot') diff --git a/Echolot/Log.pm b/Echolot/Log.pm index a3b4492..e156a3a 100644 --- a/Echolot/Log.pm +++ b/Echolot/Log.pm @@ -16,6 +16,7 @@ Echolot::Globals - echolot global variables use strict; use Carp qw{}; +#use Time::HiRes qw( gettimeofday ); my %LOGLEVELS = qw{ debug 7 @@ -37,6 +38,12 @@ my @monnames = qw{Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec}; sub header_log($$) { my ($level, $msg) = @_; + #my ($secs, $msecs) = gettimeofday(); + #my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime( $secs ); + #my $time = sprintf("%s %02d %02d:%02d:%02d.%06d", + # $monnames[$mon], + # $mday, + # $hour, $min, $sec, $msecs); my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(); my $time = sprintf("%s %02d %02d:%02d:%02d", $monnames[$mon], -- cgit v1.2.3