예제 #1
0
파일: TimeOut.php 프로젝트: sroze/tolerance
 /**
  * {@inheritdoc}
  */
 public function wait($seconds = 1)
 {
     $this->delegateWaiter->wait($seconds);
     $this->secondsEllapsed += $seconds;
     if ($this->timeOut <= $this->secondsEllapsed) {
         throw Exception\TimedOutExceeded::withValue($this->timeOut);
     }
 }
예제 #2
0
파일: Linear.php 프로젝트: sroze/tolerance
 /**
  * {@inheritdoc}
  */
 public function wait($seconds = 0)
 {
     $this->waiter->wait($this->time);
 }
예제 #3
0
 /**
  * {@inheritdoc}
  */
 public function wait($seconds = 0)
 {
     $time = $this->getNextTime($seconds);
     $this->waiter->wait($time);
     ++$this->currentExponent;
 }