-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fix time retrieval for Apple mobile in LogAssert #120358
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
Conversation
LGTM. Since the file is for debug only, it should prefer simplest approach without worrying about precision. It's also OK to be Windows/UNIX bipartite if that simplifies. |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
Co-authored-by: Jan Kotas <[email protected]>
Co-authored-by: Jan Kotas <[email protected]>
/azp run runtime-extra-platforms |
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.
Pull Request Overview
This PR fixes a build issue on Apple mobile platforms (iOS, tvOS, macCatalyst) by replacing the use of timespec_get
with gettimeofday
for time retrieval in LogAssert functionality. The timespec_get
function is only available on iOS 13+ while the minimum SDK target is iOS 12.2.
Key changes:
- Added conditional compilation for Apple mobile platforms to use
gettimeofday
instead oftimespec_get
- Included necessary header
<sys/time.h>
for Apple mobile platforms - Converted
timeval
totimespec
format to maintain compatibility with existing code
Azure Pipelines successfully started running 1 pipeline(s). |
/ba-g extra-platforms evaluate paths was canceled |
Description
The
timespec_get
function introduced in #119543 is available only on iOS 13 and later, while the minimum SDK target is iOS 12.2. This change fixes CoreCLR Apple mobile build.Changes
Use
gettimeofday
to initializetimespec
struct.