diff --git a/scripts/lib/perl5/QtQA/TestScript.pm b/scripts/lib/perl5/QtQA/TestScript.pm index 609afd3c9482f6a2933ba7f063e0aab85137ac36..fc66231db6c9958f71c7cec2625fcc421ef884d9 100644 --- a/scripts/lib/perl5/QtQA/TestScript.pm +++ b/scripts/lib/perl5/QtQA/TestScript.pm @@ -526,6 +526,10 @@ sub _push_context push @{ $self->{ _context } }, $thing; + my $time = time(); + push @{ $self->{ _context_start } }, $time; + print "#=# ". localtime($time) ." #=# >$thing\n"; + return; } @@ -538,6 +542,10 @@ sub _pop_context $self->_warn( "scope mismatch: leaving context '$actual_thing', expecting to leave '$thing'" ); } + my $time = time(); + my $elapsed = $time - pop @{ $self->{ _context_start } || [] }; + print "#=# ". localtime($time) ." #=# <$thing #=# Elapsed $elapsed second(s).\n"; + return; }