mirror of https://github.com/shirou/gopsutil
cpu, v3/cpu: use sysconf package instead of exec'ing getconf
Currently, ClocksPerSec is determined by exec'ing getconf in func init, i.e. on startup of every program importing the package. getconf might not be present on some systems or is not executable by the current user. To avoid this hard to control dependency, use the github.com/tklauser/go-sysconf package which implements sysconf(3) entirely in Go without cgo. The package is supported on all platforms currently supported by the cpu and v3/cpu package of gopsutil.pull/1036/head
parent
3585d276bc
commit
ee12f66e4d
Loading…
Reference in New Issue