Idea time API Codeigniter REST
I am using codeigniter REST-API (by philsturgeon Ref URL:
https://github.com/philsturgeon/codeigniter-restserver )
I want to add to the answer how long it took for the service to generate and process the response.
I am trying to use $this->benchmark->elapsed_time()
in my controller but it doesnโt send time, it sends
"success": 1,"took": "{elapsed_time}",
I tried to edit the main controller api abstract class REST_Controller extends CI_Controller
and add the elapsed time to the final output postpublic function response($data = null, $http_code = null, $continue = false)
But no luck I keep getting "{elapsed_time}"
Any help would be really appreciated.
source to share