Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: Search Timer Plugin Released

Quote Reply
Re: Search Timer Plugin Released In reply to
:(

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
Subject Author Views Date
Thread [RELEASED] Search Timer 1.2 Paul 9736 Feb 6, 2001, 5:04 PM
Thread Re: Search Timer Plugin Released
AlexJ 9609 Feb 6, 2001, 5:28 PM
Thread Re: Search Timer Plugin Released
padders 9562 Feb 6, 2001, 5:37 PM
Post Re: Search Timer Plugin Released
Alex 9541 Feb 6, 2001, 7:50 PM
Thread Re: Search Timer Plugin Released
Paul 9518 Feb 7, 2001, 4:57 AM
Thread Re: Search Timer Plugin Released
Paul 9516 Feb 7, 2001, 1:25 PM
Thread Re: Search Timer Plugin Released
Robert_B 9504 Feb 7, 2001, 3:25 PM
Thread Re: Search Timer Plugin Released
Paul 9504 Feb 7, 2001, 4:09 PM
Post Re: Search Timer Plugin Released
Robert_B 9458 Feb 7, 2001, 6:48 PM
Thread Re: Search Timer Plugin Released
Alex 9521 Feb 7, 2001, 8:05 PM
Post Re: Search Timer Plugin Released
Paul 9471 Feb 8, 2001, 4:54 AM
Thread Re: Search Timer Plugin Released
Paul 9494 Feb 8, 2001, 5:13 AM
Thread Re: Search Timer Plugin Released
Alex 9446 Feb 8, 2001, 10:36 AM
Post Re: Search Timer Plugin Released
Paul 9385 Feb 8, 2001, 10:49 AM
Thread Re: [RELEASED] Search Timer 1.2
ken707 9288 Apr 8, 2001, 11:06 PM
Thread Re: [RELEASED] Search Timer 1.2
Paul 9265 Apr 9, 2001, 4:53 AM
Thread Re: [RELEASED] Search Timer 1.2
ken707 9293 Apr 9, 2001, 9:39 AM
Thread Re: [RELEASED] Search Timer 1.2
Paul 9221 Apr 9, 2001, 9:44 AM
Post Re: [PaulW] Search Timer 1.2
SeanP 9052 Nov 17, 2001, 3:27 PM