[svn:p5ee] r10429 - p5ee/trunk/App-Context/lib/App

[email protected] Fri, 14 Dec 2007 12:49:36 -0800 (PST)
Newsgroups perl.cvs.p5ee
Message-ID <[email protected]>
Author: spadkins
Date: Fri Dec 14 12:49:36 2007
New Revision: 10429

Modified:
   p5ee/trunk/App-Context/lib/App/Context.pm

Log:
small bug fix to the new hi_res logging code, to force it to print 6 digits of microseconds all the time

Modified: p5ee/trunk/App-Context/lib/App/Context.pm
==============================================================================
--- p5ee/trunk/App-Context/lib/App/Context.pm	(original)
+++ p5ee/trunk/App-Context/lib/App/Context.pm	Fri Dec 14 12:49:36 2007
@@ -1583,7 +1583,7 @@
     if ($hi_res) {
         App->use("Time::HiRes");
         my @timestuff = Time::HiRes::gettimeofday();
-        $timestamp = time2str("%Y-%m-%d %H:%M:%S.", $timestuff[0]) . sprintf("%.6f", $timestuff[1]); 
+        $timestamp = time2str("%Y-%m-%d %H:%M:%S.", $timestuff[0]) . sprintf("%06d", $timestuff[1]); 
         if ($elapsed) {
             my $elapsed = Time::HiRes::tv_interval($self->{_last_log_elapsed_time}, \@timestuff);
             $timestamp .= " " . sprintf("%.6f", $elapsed);