mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-24 13:48:56 +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 uint32
|
|
Nice uint32
|
|
Sys uint32
|
|
Spin uint32
|
|
Intr uint32
|
|
Idle uint32
|
|
}
|