commit | ddc71cc3873792902541abf821f9d21bbc8d7110 | [log] [tgz] |
---|---|---|
author | Seth Hoenig <shoenig@duck.com> | Thu Mar 23 00:42:25 2023 -0500 |
committer | Seth Hoenig <shoenig@duck.com> | Thu Mar 23 00:42:25 2023 -0500 |
tree | 2bffc65b4698fddd7a9f6483801f7eb530c23d65 | |
parent | cc6cb61ff95a9fae151b0f8b44c2e9289acd3326 [diff] |
readme: fixup naming and add badges
The go-m1cpu
module is a library for inspecting Apple Silicon CPUs in Go.
Use the m1cpu
library for looking up the CPU frequency for Apple M1 and M2 CPUs.
go get github.com/shoenig/go-m1cpu@latest
package main
import (
"fmt"
"github.com/shoenig/go-m1cpu"
)
func main() {
fmt.Println("pCore", m1cpu.PCoreGHz())
fmt.Println("eCore", m1cpu.ECoreGHz())
}
This package requires the use of CGO. Extracting the CPU properties is done via Apple's IOKit framework, which is accessible only through system C libraries.
Open source under the MPL