83 $this->_sleeper = $sleeper;
84 $this->_timer = $timer;
95 if (!isset($this->_start)) {
96 $this->_start = $time;
100 switch ($this->_mode) {
101 case self::BYTES_PER_MINUTE :
104 case self::MESSAGES_PER_SECOND :
107 case self::MESSAGES_PER_MINUTE :
116 $this->
sleep($sleep);
127 parent::sendPerformed($evt);
138 if (isset($this->_sleeper)) {
139 $this->_sleeper->sleep($seconds);
152 if (isset($this->_timer)) {
153 return $this->_timer->getTimestamp();
168 $expectedDuration = $this->
getBytesOut() / ($this->_rate / 60);
170 return (
int) ceil($expectedDuration - $timePassed);
184 return (
int) ceil($expectedDuration - $timePassed);
196 $expectedDuration = $this->_messages / ($this->_rate / 60);
198 return (
int) ceil($expectedDuration - $timePassed);