Welcome Guest, Not a member yet? Register   Sign In
how can i get {elapsed_time} variable in controller

I believe that, even if you use $this->benchmark->elapsed_time(), it's just going to output '{elapsed_time}', because the total execution time isn't available until the Output class makes the substitution.

If you're still going through the Output class, you just need to find a way to escape the output in your template engine to maintain the curly braces in the {elapsed_time} pseudo-variable.

If you're bypassing or overriding the Output->display() method, you would need to use (more or less) the same code which is used in that method to get the information you're looking for. If you do this, though, remember that the {elapsed_time} is not accurate unless the benchmark->elapsed_time() method is called as close as possible to the end of the server's response (right before output actually begins).

Messages In This Thread
RE: how can i get {elapsed_time} variable in controller - by mwhitney - 06-05-2015, 11:59 AM

Theme © iAndrew 2016 - Forum software by © MyBB