Diff for /loncom/xml/lonxml.pm between versions 1.338 and 1.339

version 1.338, 2004/08/29 08:14:41 version 1.339, 2004/10/05 18:51:50
Line 51  use Math::Cephes(); Line 51  use Math::Cephes();
 use Math::Random();  use Math::Random();
 use Opcode();  use Opcode();
 use POSIX qw(strftime);  use POSIX qw(strftime);
   use Time::HiRes qw( gettimeofday tv_interval );
   
 sub register {  sub register {
   my ($space,@taglist) = @_;    my ($space,@taglist) = @_;
Line 815  sub initdepth { Line 815  sub initdepth {
   $Apache::lonxml::olddepth=-1;    $Apache::lonxml::olddepth=-1;
 }  }
   
   my @timers;
   my $lasttime;
 sub increasedepth {  sub increasedepth {
   my ($token) = @_;    my ($token) = @_;
   $Apache::lonxml::depth++;    $Apache::lonxml::depth++;
Line 822  sub increasedepth { Line 824  sub increasedepth {
   if ($Apache::lonxml::depthcounter[$Apache::lonxml::depth]==1) {    if ($Apache::lonxml::depthcounter[$Apache::lonxml::depth]==1) {
     $Apache::lonxml::olddepth=$Apache::lonxml::depth;      $Apache::lonxml::olddepth=$Apache::lonxml::depth;
   }    }
     push(@timers,[&gettimeofday()]);
     my $time=&tv_interval($lasttime);
     $lasttime=[&gettimeofday()];
     my $spacing='  'x($Apache::lonxml::depth-1);
   my $curdepth=join('_',@Apache::lonxml::depthcounter);    my $curdepth=join('_',@Apache::lonxml::depthcounter);
   &Apache::lonxml::debug("s $Apache::lonxml::depth : $Apache::lonxml::olddepth : $curdepth : $token->[1]\n");    &Apache::lonxml::debug("s$spacing$Apache::lonxml::depth : $Apache::lonxml::olddepth : $curdepth : $token->[1] : $time : \n");
 #print "<br />s $Apache::lonxml::depth : $Apache::lonxml::olddepth : $curdepth : $token->[1]\n";  #print "<br />s $Apache::lonxml::depth : $Apache::lonxml::olddepth : $curdepth : $token->[1]\n";
 }  }
   
Line 838  sub decreasedepth { Line 844  sub decreasedepth {
     &Apache::lonxml::warning(&mt("Missing tags, unable to properly run file."));      &Apache::lonxml::warning(&mt("Missing tags, unable to properly run file."));
     $Apache::lonxml::depth='-1';      $Apache::lonxml::depth='-1';
   }    }
     my $timer=pop(@timers);
     my $time=&tv_interval($lasttime);
     $lasttime=[&gettimeofday()];
     my $spacing='  'x$Apache::lonxml::depth;
   my $curdepth=join('_',@Apache::lonxml::depthcounter);    my $curdepth=join('_',@Apache::lonxml::depthcounter);
   &Apache::lonxml::debug("e $Apache::lonxml::depth : $Apache::lonxml::olddepth : $token->[1] : $curdepth\n");    &Apache::lonxml::debug("e$spacing$Apache::lonxml::depth : $Apache::lonxml::olddepth : $curdepth : $token->[1] : $time : ".&tv_interval($timer)."\n");
 #print "<br />e $Apache::lonxml::depth : $Apache::lonxml::olddepth : $token->[1] : $curdepth\n";  #print "<br />e $Apache::lonxml::depth : $Apache::lonxml::olddepth : $token->[1] : $curdepth\n";
 }  }
   

Removed from v.1.338  
changed lines
  Added in v.1.339


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>