From 63591455bdc558094bdcae1c18f58e4731c68240 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 eca3141fe29b6..9ff05cf4f6d04 100644 --- a/src/Symfony/Component/Process/CHANGELOG.md +++ b/src/Symfony/Component/Process/CHANGELOG.md @@ -12,7 +12,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 1815888f4df25..00dafcec4b372 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -954,6 +954,16 @@ public function addErrorOutput(string $line) 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. *