summaryrefslogtreecommitdiff
path: root/Echolot/Log.pm
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2004-04-26 14:40:10 +0000
committerPeter Palfrader <peter@palfrader.org>2004-04-26 14:40:10 +0000
commitd1308fa6352866f1664dba895fd3298f8eb8eebf (patch)
tree43221e145aec99633c9d200eebf0d469c882da7c /Echolot/Log.pm
parentf9c5b67b14d715ecabc1364564b2523748dcb16d (diff)
Use HiRes timestamp in log - commented out for now however. Requires libtime-hires-perl or perl 5.8.
Diffstat (limited to 'Echolot/Log.pm')
-rw-r--r--Echolot/Log.pm7
1 files changed, 7 insertions, 0 deletions
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],