LXDebug->log_time routine
authorSven Schöling <s.schoeling@linet-services.de>
Mon, 15 Mar 2010 10:45:00 +0000 (11:45 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Tue, 20 Jul 2010 09:23:08 +0000 (11:23 +0200)
SL/LXDebug.pm

index 43ad76a..e3778d4 100644 (file)
@@ -245,6 +245,12 @@ sub end_request {
   $self->{calldepth} = 0;
 }
 
+sub log_time {
+  my $self = shift;
+  return 1 unless want_request_timer();
+  $self->_write("time", $self->get_request_time);
+}
+
 sub get_request_time {
   my $self = shift;
   return $self->want_request_timer && $self->{request_start} ? tv_interval($self->{request_start}) : undef;