Elastica\ResultSet::getTotalTime PHP Method

getTotalTime() public method

Returns the total number of ms for this search to complete.
public getTotalTime ( ) : integer
return integer Total time
    public function getTotalTime()
    {
        $data = $this->_response->getData();
        return isset($data['took']) ? $data['took'] : 0;
    }

Usage Example

Example #1
0
 /**
  * Return the total amount of time for the last search.
  *
  * @return int
  */
 public function getTotalTime()
 {
     if (isset($this->results)) {
         return $this->results->getTotalTime();
     }
 }
All Usage Examples Of Elastica\ResultSet::getTotalTime