Commit 065cec8b authored by Leigh Stoller's avatar Leigh Stoller

Change TBDebugTimeStamp() to "use" Time::HiRes module

(/usr/ports/devel/p5-Time-HiRes) to get higher resolution
gettimeofday() function that reports microseconds and seconds. Change
the output routine to append the microseconds to the original HH:MM:SS
timestamps that get printed.
parent 9cb3dcfc
......@@ -2,7 +2,7 @@
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# Copyright (c) 2000-2004 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -22,6 +22,7 @@ use POSIX qw(setsid);
use Fcntl;
use IO::Handle;
use File::Basename;
use Time::HiRes qw(gettimeofday);
#my $MAILTAG = "@OURDOMAIN@";
my $MAILTAG = "@THISHOMEBASE@";
......@@ -147,7 +148,9 @@ sub OPENMAIL($$;$$)
#
sub TBTimeStamp()
{
return POSIX::strftime("%H:%M:%S", localtime());
my ($seconds, $microseconds) = gettimeofday();
return POSIX::strftime("%H:%M:%S", localtime($seconds)) . ":$microseconds";
}
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment