Re: Template execution time

From: Date: Mon, 12 May 2003 15:50:47 +0000
Subject: Re: Template execution time
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9524@lists.php.net to get a copy of this message
Hi, thanks for your answers but my problem isn't really measure the time. I have a "timer" class to do that. The problem is how to force Smarty always measure script execution even if the template is cached. An example: the first time template is shown, it takes 1 second. Second time, template is cached, it takes 0,5 seconds but, because it is cached it still show 1 second and I want to show the real time it takes to be generated. I don't know if explain correctly but my english is poor. TIA "Pt2002" <pt2002@mail.pt> escreveu na mensagem news:20030512140314.96254.qmail@pb1.pair.com... > Hi > > I need to show at the end of the page something like "This page took n > seconds to be generated" even if the template is cached. > > I can do: > > $ini = time(); > > $tpl = new Smarty(); > > if (!is_cached("test.tpl") { > $tpl->assign("var1", "xpto") > ... > } > > $tpl->display("test.tpl"); > > How can I show the execution time at end of the page? > TIA > >

« previous php.smarty.general (#9524) next »