GraphAware\Reco4PHP\Context\Statistics::getCurrentTimeSpent PHP Method

getCurrentTimeSpent() public method

public getCurrentTimeSpent ( ) : float
return float
    public function getCurrentTimeSpent()
    {
        $discovery = null !== $this->discoveryTime ? $this->discoveryTime : 0.0;
        $postProcess = null !== $this->postProcessingTime ? $this->postProcessingTime : 0.0;
        return $discovery + $postProcess;
    }

Usage Example

Example #1
0
 /**
  * {@inheritdoc}
  */
 public function timeLeft() : bool
 {
     return $this->statistics->getCurrentTimeSpent() < $this->config()->limit();
 }