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

Page timer plugin (help needed)

Quote Reply
Page timer plugin (help needed)
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...
    Subject Author Views Date
    Thread Page timer plugin (help needed) webmaster33 4685 Feb 21, 2002, 3:16 PM
    Thread Re: [webmaster33] Page timer plugin (help needed)
    Paul 4587 Feb 21, 2002, 3:19 PM
    Thread Re: [RedRum] Page timer plugin (help needed)
    webmaster33 4566 Feb 21, 2002, 6:53 PM
    Thread Re: [webmaster33] Page timer plugin (help needed)
    Paul 4576 Feb 22, 2002, 2:47 AM
    Thread Re: [RedRum] Page timer plugin (help needed)
    webmaster33 4542 Feb 22, 2002, 6:57 AM
    Thread Re: [webmaster33] Page timer plugin (help needed)
    Paul 4533 Feb 22, 2002, 6:59 AM
    Thread Re: [RedRum] Page timer plugin (help needed)
    webmaster33 4522 Feb 22, 2002, 9:07 AM
    Thread Re: [webmaster33] Page timer plugin (help needed)
    Paul 4530 Feb 22, 2002, 9:12 AM
    Thread Re: [RedRum] Page timer plugin (help needed)
    webmaster33 4532 Feb 22, 2002, 9:58 AM
    Thread Re: [webmaster33] Page timer plugin (help needed)
    Paul 4485 Feb 22, 2002, 10:48 AM
    Post Re: [RedRum] Page timer plugin (help needed)
    webmaster33 4531 Feb 22, 2002, 11:31 AM