public function calculate(int $callsMade, int $callsLimit)
    {
        $callPercentage = floatval($callsMade / $callsLimit);
        $limitPercentage = floatval(($callsLimit - $this->processes - $this->buffer) / $callsLimit);

        return $callPercentage > $limitPercentage ? ($this->processes * $this->cycle) : $this->cycle;
    }
public function calculate(int $callsMade, int $callsLimit)
    {
        $callPercentage = floatval($callsMade / $callsLimit);
        $limitPercentage = floatval(($callsLimit - $this->processes - $this->buffer) / $callsLimit);

        return $callPercentage > $limitPercentage ? ($this->processes * $this->cycle) : $this->cycle;
    }
public function calculate ( int $ callsMade , int $ callsLimit ) { $ callPercentage = floatval ( $ callsMade / $ callsLimit ) ; $ limitPercentage = floatval ( ( $ callsLimit - $ this -> processes - $ this -> buffer ) / $ callsLimit ) ; return $ callPercentage > $ limitPercentage ? ( $ this -> processes * $ this -> cycle ) : $ this -> cycle ; }
Calculate the time in seconds between each request.

@param  int    $callsMade
@param  int    $callsLimit
@return float|int
Calculate the time in seconds between each request .