mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-26 13:48:59 +08:00

Even thought OpenBSD often breaks the ABI compatibility and doesn't make *any* promise of "stability", this project aims to be "pure go" so avoid doing inter-op at the cost of artificially reducing the number of supported architectures down to amd64 and i386. To add support for another architecture (e.g. arm), add another file cpu_openbsd_${arch}.go like done for 386 and amd64. The fields are declared as `long' in C, so pick the appropriate size when declaring the struct.
11 lines
116 B
Go
11 lines
116 B
Go
package cpu
|
|
|
|
type cpuTimes struct {
|
|
User uint64
|
|
Nice uint64
|
|
Sys uint64
|
|
Spin uint64
|
|
Intr uint64
|
|
Idle uint64
|
|
}
|