Commit 1543a9d
Use timespec_get on iOS/tvOS/MacCatalyst now that 13.0 is the minimum version (#130246)
`timespec_get` was previously unavailable on iOS/tvOS/MacCatalyst below
13.0, so `LogAssert` in `debug.cpp` fell back to `gettimeofday` for
those platforms. Since 13.0 is now the minimum deployment target, that
fallback is no longer needed there.
## Changes
- **`src/coreclr/utilcode/debug.cpp`**: Remove `HOST_IOS`, `HOST_TVOS`,
and `HOST_MACCATALYST` from the `gettimeofday` fallback condition —
`timespec_get` is now used directly on those platforms. `HOST_ANDROID`
retains the fallback since targeted Android API levels still lack
`timespec_get` support.
```c
// Before
#if defined(HOST_IOS) || defined(HOST_TVOS) || defined(HOST_MACCATALYST) || defined(HOST_ANDROID)
// timespec_get is only available on iOS 13.0+ and not supported on Android API levels we target
// After
#if defined(HOST_ANDROID)
// timespec_get is not supported on Android API levels we target
```
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: BrzVlad <4720621+BrzVlad@users.noreply.github.com>1 parent 3a604f0 commit 1543a9d
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
167 | | - | |
| 166 | + | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| |||
0 commit comments