2020-07-01 12:47:56 +00:00
|
|
|
// +build !darwin,!linux,!freebsd,!openbsd,!solaris,!windows,!dragonfly
|
2017-02-01 18:26:00 +00:00
|
|
|
|
|
|
|
package cpu
|
|
|
|
|
|
|
|
import (
|
2018-10-19 18:33:23 +00:00
|
|
|
"context"
|
2020-07-01 12:47:56 +00:00
|
|
|
"runtime"
|
2017-02-01 18:26:00 +00:00
|
|
|
|
|
|
|
"github.com/shirou/gopsutil/internal/common"
|
|
|
|
)
|
|
|
|
|
|
|
|
func Times(percpu bool) ([]TimesStat, error) {
|
2018-10-19 18:33:23 +00:00
|
|
|
return TimesWithContext(context.Background(), percpu)
|
|
|
|
}
|
|
|
|
|
|
|
|
func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, error) {
|
2017-02-01 18:26:00 +00:00
|
|
|
return []TimesStat{}, common.ErrNotImplementedError
|
|
|
|
}
|
|
|
|
|
|
|
|
func Info() ([]InfoStat, error) {
|
2018-10-19 18:33:23 +00:00
|
|
|
return InfoWithContext(context.Background())
|
2017-02-01 18:26:00 +00:00
|
|
|
}
|
|
|
|
|
2018-10-19 18:33:23 +00:00
|
|
|
func InfoWithContext(ctx context.Context) ([]InfoStat, error) {
|
|
|
|
return []InfoStat{}, common.ErrNotImplementedError
|
2017-02-01 18:26:00 +00:00
|
|
|
}
|
2020-07-01 12:47:56 +00:00
|
|
|
|
|
|
|
func CountsWithContext(ctx context.Context, logical bool) (int, error) {
|
|
|
|
return runtime.NumCPU(), nil
|
|
|
|
}
|