Remove microtimeFloat method
This commit is contained in:
parent
014112a16f
commit
d7bb7bd091
2 changed files with 1 additions and 12 deletions
|
|
@ -150,7 +150,7 @@ abstract class ProgressHelper implements HelperInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
$currentDuration = $this->convertDuration($matches[2]);
|
$currentDuration = $this->convertDuration($matches[2]);
|
||||||
$currentTime = $this->microtimeFloat();
|
$currentTime = microtime(true);
|
||||||
$currentSize = trim(str_replace('kb', '', strtolower(($matches[1]))));
|
$currentSize = trim(str_replace('kb', '', strtolower(($matches[1]))));
|
||||||
$percent = max(0, min(1, $currentDuration / $this->duration));
|
$percent = max(0, min(1, $currentDuration / $this->duration));
|
||||||
|
|
||||||
|
|
@ -211,18 +211,8 @@ abstract class ProgressHelper implements HelperInterface
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return number
|
|
||||||
*/
|
|
||||||
protected function microtimeFloat()
|
|
||||||
{
|
|
||||||
list($usec, $sec) = explode(" ", microtime());
|
|
||||||
return ((float)$usec + (float)$sec);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the regex pattern to match a ffmpeg stderr status line
|
* Get the regex pattern to match a ffmpeg stderr status line
|
||||||
*/
|
*/
|
||||||
abstract function getPattern();
|
abstract function getPattern();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ class ProgressTest extends FFMpegTest
|
||||||
* @covers FFMpeg\Helper\ProgressHelper::parseProgress
|
* @covers FFMpeg\Helper\ProgressHelper::parseProgress
|
||||||
* @covers FFMpeg\Helper\ProgressHelper::convertDuration
|
* @covers FFMpeg\Helper\ProgressHelper::convertDuration
|
||||||
* @covers FFMpeg\Helper\ProgressHelper::getProgressInfo
|
* @covers FFMpeg\Helper\ProgressHelper::getProgressInfo
|
||||||
* @covers FFMpeg\Helper\ProgressHelper::microtimeFloat
|
|
||||||
* @covers FFMpeg\Helper\AudioProgressHelper::getPattern
|
* @covers FFMpeg\Helper\AudioProgressHelper::getPattern
|
||||||
*/
|
*/
|
||||||
public function testProgressHelper()
|
public function testProgressHelper()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue