Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f46ab58

Browse filesBrowse files
feature #35673 [Process] Add getter for process starttime (dompie)
This PR was squashed before being merged into the 5.1-dev branch. Discussion ---------- [Process] Add getter for process starttime | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | issue #35531 | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> Add a getter for process start time. Commits ------- 3b9ed3e [Process] Add getter for process starttime
2 parents 0f46aa6 + 3b9ed3e commit f46ab58
Copy full SHA for f46ab58

File tree

2 files changed

+17
-0
lines changed
Filter options

2 files changed

+17
-0
lines changed

‎src/Symfony/Component/Process/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Process/CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
5.1.0
5+
-----
6+
7+
* added `Process::getStartTime()` to retrieve the start time of the process as float
8+
49
5.0.0
510
-----
611

‎src/Symfony/Component/Process/Process.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Process/Process.php
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff 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
*/

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.