private function throttleBytesPerMinute($timePassed) { $expectedDuration = $this->getBytesOut() / ($this->rate / 60); return (int) ceil($expectedDuration - $timePassed); }