From 0e7bf6fb52fefc44333828c5db122220725032e4 Mon Sep 17 00:00:00 2001 From: Karoly Gossler Date: Fri, 9 Aug 2019 15:40:51 +0200 Subject: [PATCH] added `Process::getLastOutputTime()` method --- src/Symfony/Component/Process/CHANGELOG.md | 3 ++- src/Symfony/Component/Process/Process.php | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Component/Process/CHANGELOG.md b/src/Symfony/Component/Process/CHANGELOG.md index a0f55b52bc..69d4cbd77b 100644 --- a/src/Symfony/Component/Process/CHANGELOG.md +++ b/src/Symfony/Component/Process/CHANGELOG.md @@ -4,7 +4,8 @@ CHANGELOG 4.4.0 ----- -* deprecated `Process::inheritEnvironmentVariables()`: env variables are always inherited. + * deprecated `Process::inheritEnvironmentVariables()`: env variables are always inherited. + * added `Process::getLastOutputTime()` method 4.2.0 ----- diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index 5a3cdd58b1..14abbc47a0 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -954,6 +954,16 @@ class Process implements \IteratorAggregate fseek($this->stderr, $this->incrementalErrorOutputOffset); } + /** + * Gets the last output time in seconds + * + * @return float|null The last output time in seconds or null if it isn't started + */ + public function getLastOutputTime(): ?float + { + return $this->lastOutputTime; + } + /** * Gets the command line to be executed. *