File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
src/Symfony/Component/Process Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 11CHANGELOG
22=========
33
4+ 5.1.0
5+ -----
6+
7+ * added ` Process::getStartTime() ` to retrieve the start time of the process as float
8+
495.0.0
510-----
611
Original file line number Diff line number Diff line change @@ -1208,6 +1208,18 @@ public function checkTimeout()
12081208 }
12091209 }
12101210
1211+ /**
1212+ * @throws LogicException in case process is not started
1213+ */
1214+ public function getStartTime (): float
1215+ {
1216+ if (!$ this ->isStarted ()) {
1217+ throw new LogicException ('Start time is only available after process start. ' );
1218+ }
1219+
1220+ return $ this ->starttime ;
1221+ }
1222+
12111223 /**
12121224 * Returns whether TTY is supported on the current operating system.
12131225 */
You can’t perform that action at this time.
0 commit comments