New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add creationTime function to process #13542
Changes from 6 commits
e27592e
78b9aaf
c4cdfc9
14c452c
81d2dbd
9025cef
34bb5d4
9c03832
6deffff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,6 +111,12 @@ The `process` object has the following methods: | |
|
||
Causes the main thread of the current process crash. | ||
|
||
### `process.getCreationTime()` | ||
|
||
Returns `number` | ||
Indicates the creation time of the application. | ||
The time is represented as number of milliseconds since epoch. It returns null if it is unable to get the process creation time. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we need to document this as "Returns
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done @ckerr There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this comment got misplaced, no menu stuff here 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @MarshallOfSound you're correct, that should've read There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @husayn I don't know if it the capitalization is required, but all our other documentation instances use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ckerr capitalized it. |
||
### `process.getCPUUsage()` | ||
|
||
Returns [`CPUUsage`](structures/cpu-usage.md) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not do v8 conversions manually,
native_mate
will handle the conversions in a consistent way if you just return a cpp type.I.e. Just make this return
double
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MarshallOfSound
double
doesn't work if we want to return an "empty value".And we have to return
null
when the time cannot be obtained.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MarshallOfSound can you please approve the changes if this looks good?