/**
  * @param int $bytes
  * @param float $duration Seconds with miliseconds
  * @return string
  */
 public function format($bytes, $duration)
 {
     if ($duration == 0) {
         return '';
     }
     $bytesPerSec = $bytes / $duration;
     return $this->filesizeFormater->format($bytesPerSec) . '/s';
 }
 /**
  * @param int $photoSize
  * @param int $startTime
  * @return array
  */
 private function getFinalStats($photoSize, $startTime)
 {
     $size = $this->filesizeFormater->format($photoSize);
     $duration = max(array(microtime(TRUE) - $startTime, 0.001));
     $time = $this->timeFormater->format($duration);
     $speed = $this->speedFormater->format($photoSize, $duration);
     return array($time, $size, $speed);
 }