2021-12-23 05:54:41 +08:00
|
|
|
//go:build !darwin && !linux && !freebsd && !openbsd && !solaris && !windows && !dragonfly && !plan9 && !aix
|
2021-11-09 21:14:54 +08:00
|
|
|
// +build !darwin,!linux,!freebsd,!openbsd,!solaris,!windows,!dragonfly,!plan9,!aix
|
2016-08-23 06:31:26 +08:00
|
|
|
|
|
|
|
package cpu
|
|
|
|
|
|
|
|
import (
|
2017-12-31 14:25:49 +08:00
|
|
|
"context"
|
2019-03-03 21:38:33 +08:00
|
|
|
"runtime"
|
2017-12-31 14:25:49 +08:00
|
|
|
|
2021-11-06 17:53:56 +08:00
|
|
|
"github.com/shirou/gopsutil/v3/internal/common"
|
2016-08-23 06:31:26 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
func Times(percpu bool) ([]TimesStat, error) {
|
2017-12-31 14:25:49 +08:00
|
|
|
return TimesWithContext(context.Background(), percpu)
|
|
|
|
}
|
|
|
|
|
|
|
|
func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, error) {
|
2016-08-23 06:31:26 +08:00
|
|
|
return []TimesStat{}, common.ErrNotImplementedError
|
|
|
|
}
|
|
|
|
|
|
|
|
func Info() ([]InfoStat, error) {
|
2017-12-31 14:25:49 +08:00
|
|
|
return InfoWithContext(context.Background())
|
|
|
|
}
|
|
|
|
|
|
|
|
func InfoWithContext(ctx context.Context) ([]InfoStat, error) {
|
2016-08-23 06:31:26 +08:00
|
|
|
return []InfoStat{}, common.ErrNotImplementedError
|
|
|
|
}
|
2019-03-03 21:38:33 +08:00
|
|
|
|
|
|
|
func CountsWithContext(ctx context.Context, logical bool) (int, error) {
|
|
|
|
return runtime.NumCPU(), nil
|
|
|
|
}
|