Commit 08bb266
committed
[cpu][mac] change not return error even if cpu.frequency errors
Backport of shirou#1192.
sysctl hw.cpufrequency does not return anything on macOS M1. This causes cpu.Info()
to return an error every time it is called on macOS M1.
A partial fix of this issue is to ignore errors, and leave the frequency field with
its default value.1 parent b1d3204 commit 08bb266
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
| 72 | + | |
| 73 | + | |
74 | 74 | | |
75 | | - | |
76 | 75 | | |
77 | 76 | | |
78 | 77 | | |
0 commit comments