I'm trying to display a server response time on the page similar to google's search time, something like "page loaded in about 1.3 seconds" or so.
What is the best way of achieving this? I currently have a MVC framework setup, and my initial approach was to store initial time in the controller, and pass it as the model into the view and it is up to view to calculate the time elapsed.
Somehow I feel there must be a better approach, that, for all requests, context might already have the information recorded, either the request start time, or the elapsed time.
Can someone please verify if my original thought was right? or there exists an already implemented solution?
Thanks,
Jason