3 #=======================================================================
5 #=======================================================================
9 use POSIX
qw{ strftime
};
10 use Time
::HiRes
qw{ gettimeofday
};
16 my $curr_time = sprintf("%.6f", 1.0 * Time
::HiRes
::time());
17 my ($Sec, $Min, $Hour, $Day, $Mon, $Year, $Wday, $Yday) = gmtime(1.0 * $curr_time - 0.0);
18 $Sec = sprintf("%02u", $Sec);
19 $Min = sprintf("%02u", $Min);
20 $Hour = sprintf("%02u", $Hour);
21 $Day = sprintf("%02u", $Day);
22 $Mon = sprintf("%02u", $Mon + 1);
23 $Year = sprintf("%04u", $Year + 1900);
24 # D("curr_time = '$curr_time'");
25 my $Date = "$Year-$Mon-${Day}T$Hour:$Min:$Sec" .
26 ($curr_time =~ /^(\d+)(\.\d+)/ ?
$2 : "") .
32 # Print a debugging message {{{
34 my @call_info = caller;
35 chomp(my $Txt = shift);
36 my $File = $call_info[1];
38 $File =~ s
#^.*/(.*?)$#$1#;
39 print(STDERR
"$File:$call_info[2] $$ $Txt\n");