I'm trying to create a Page timer plugin, which displays the time of a page build.
1) The starting time should be stored at the very beginning of the code. But this is not possible, because there is no hook at these positions.
Another solution is to store the starting time by hacking the LinksSQL code e.g. in Page.pm, and :
a) storing into a global variable e.g.: $CFG->{start_time}
or
b) to make accessible this starting time value to all other subroutines, by passing to e.g.: build_category.
2) The last possible position where we can put timer value into the template, is to call a subroutine from the template itself to calculate the elapsed time: <%Plugins::Timer_Page::TimeElapsed%>
which has the following:
sub EndTime { return sprintf ("%.3f", time - $CFG->{start_time}); }
I'm waiting ideas, solutions how to solve this page timer plugin problem.
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
1) The starting time should be stored at the very beginning of the code. But this is not possible, because there is no hook at these positions.
Another solution is to store the starting time by hacking the LinksSQL code e.g. in Page.pm, and :
or
2) The last possible position where we can put timer value into the template, is to call a subroutine from the template itself to calculate the elapsed time: <%Plugins::Timer_Page::TimeElapsed%>
which has the following:
sub EndTime { return sprintf ("%.3f", time - $CFG->{start_time}); }
I'm waiting ideas, solutions how to solve this page timer plugin problem.
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...