|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
gianni Smarty Rookie
Joined: 14 May 2003 Posts: 29 Location: Bari, Italy
|
Posted: Fri May 30, 2003 1:19 pm Post subject: problems about the building of a timer for a php script |
|
|
Hi all,
I'm writing some code to build a timer that shows me the secons spent to create my page. I put at the top of the PHP script some code to store the time and now I have to put other istructions at the bottom to calculate the elapsed time but I dont know where the end of my script is, because my last istruction is: $smarty->display("template.tpl");
If I put those istructions before "$smarty->display(..." I would neglect the time spent by smarty.
Any idea?
Thanks. |
|
Back to top |
|
Justin Smarty Regular
Joined: 07 May 2003 Posts: 38 Location: Vilnius, Lithuania
|
Posted: Fri May 30, 2003 1:44 pm Post subject: Re: problems about the building of a timer for a php script |
|
|
gianni wrote: | Hi all,
I'm writing some code to build a timer that shows me the secons spent to create my page. I put at the top of the PHP script some code to store the time and now I have to put other istructions at the bottom to calculate the elapsed time but I dont know where the end of my script is, because my last istruction is: $smarty->display("template.tpl");
If I put those istructions before "$smarty->display(..." I would neglect the time spent by smarty.
Any idea?
Thanks. |
<?php
// benchmark start
...
...
...
$content = $smarty->fetch( "template.tpl" );
// bechmark end
echo $content;
?> _________________ http://www.baubas.net |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|