1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-24 13:48:56 +08:00
shirou_gopsutil/cpu/cpu_fallback.go

32 lines
806 B
Go
Raw Permalink Normal View History

// SPDX-License-Identifier: BSD-3-Clause
2023-09-16 17:44:58 +08:00
//go:build !darwin && !linux && !freebsd && !openbsd && !netbsd && !solaris && !windows && !dragonfly && !plan9 && !aix
package cpu
import (
2017-12-31 15:25:49 +09:00
"context"
"runtime"
2017-12-31 15:25:49 +09:00
"github.com/shirou/gopsutil/v4/internal/common"
)
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) {
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) {
return []InfoStat{}, common.ErrNotImplementedError
}
func CountsWithContext(ctx context.Context, logical bool) (int, error) {
return runtime.NumCPU(), nil
}