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