:(
I've done everything you said and have checked the code and I just can't see anything wrong, but I'm still getting....
94798465384.69
....or something like that.
Knowing me, I've probably missed something really obvious...here is the code I have.......
package Plugins::Timer;
# ==================================================================
use strict;
use GT::Plugins qw/STOP CONTINUE/;
use Links qw/$IN $DB $TPL/;
use Time::HiRes qw/time/;
sub Start {
# -------------------------------------------------------------------
# This subroutine will get called whenever the hook 'search_results'
# is run. You should return STOP if you don't want
# the regular code to run, or CONTINUE if you want
# the regular code to run.
#
my $args = shift;
$args->{start_time} = time;
return $args;
return CONTINUE;
}
sub Stop {
# -------------------------------------------------------------------
# This subroutine will get called whenever the hook 'search_results'
# is run. You should return STOP if you don't want
# the regular code to run, or CONTINUE if you want
# the regular code to run.
#
my $args = shift;
$args->{end_time} = time;
$args->{search_time} = sprintf ("%.2f", $args->{end_time} - $args->{start_time});
return $args;
return CONTINUE;
}
# Always end with a 1.
1;
Paul Wilson.
new -
http://www.wiredon.net