Hi backdream,
You'll need to install the Time::HiRes module in order to do this - otherwise the best you can get is whole seconds - and even if you see "1 second" it could be anywhere from 0.00001 seconds to 1.999999 seconds. Hence, doing this without Time::HiRes is almost pointless.
You'll need to make the changes in gforum.cgi (I've done this from time to time for development/optimization purposes). Basically, add this line immediately after all the "use" statements in the file:
Then add this line immediately after "sub main {":
After that, you're going to have to add a global - called "time_elapsed", perhaps. Its contents will be:
Then, wherever you want to display the time, just put:
Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
You'll need to install the Time::HiRes module in order to do this - otherwise the best you can get is whole seconds - and even if you see "1 second" it could be anywhere from 0.00001 seconds to 1.999999 seconds. Hence, doing this without Time::HiRes is almost pointless.
You'll need to make the changes in gforum.cgi (I've done this from time to time for development/optimization purposes). Basically, add this line immediately after all the "use" statements in the file:
Code:
use Time::HiRes;Then add this line immediately after "sub main {":
Code:
$GForum::Start::Time = Time::HiRes::time();After that, you're going to have to add a global - called "time_elapsed", perhaps. Its contents will be:
Code:
sub { $GForum::Start::Time - Time::HiRes::time() }Then, wherever you want to display the time, just put:
Code:
Time to load: <%time_elapsed%> sJason Rhinelander
Gossamer Threads
jason@gossamer-threads.com