2017-03-12 04:54:02 +08:00
|
|
|
// +build !darwin,!linux,!freebsd,!openbsd,!solaris,!windows
|
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
|
|
|
|
2016-08-23 06:31:26 +08:00
|
|
|
"github.com/shirou/gopsutil/internal/common"
|
|
|
|
)
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|