-
Notifications
You must be signed in to change notification settings - Fork 12
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
Catch process.TotalProcessorTime exception #44
Conversation
process.TotalProcessorTime is not supported on all platforms
Thanks for reaching us to us with pull request! Calculating process.age can be done via internal calculation. The catch block supposes to catch other exceptions related to memory information. @perf2711 can you share your approach? |
The code seems to contradict this statement considering you're explicitly catching "PlatformNotSupportedException" |
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.
Thank you for your submission!
This change is sound. The only thing I could suggest is that we keep try/catch separate, so we can still try and retrieve other stuff.
As for the alternative approach, we can implement this after this is merged, so as not to block this change.
Co-authored-by: Sebastian Alex <[email protected]>
@timmac-qmc can you fix formatting issues, so we can merge this change? See this check. |
Should hopefully be correct now |
Found some whitespace, have to say that failing on that seems a bit extreme, it has literally no effect on formatting... |
Remove whitespace (that's not even an issue...)
process.TotalProcessorTime is not supported on all platforms