summaryrefslogtreecommitdiff
path: root/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_fallback.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/shirou/gopsutil/v4/cpu/cpu_fallback.go')
-rw-r--r--vendor/github.com/shirou/gopsutil/v4/cpu/cpu_fallback.go31
1 files changed, 31 insertions, 0 deletions
diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_fallback.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_fallback.go
new file mode 100644
index 0000000..245c1ec
--- /dev/null
+++ b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_fallback.go
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: BSD-3-Clause
+//go:build !darwin && !linux && !freebsd && !openbsd && !netbsd && !solaris && !windows && !dragonfly && !plan9 && !aix
+
+package cpu
+
+import (
+ "context"
+ "runtime"
+
+ "github.com/shirou/gopsutil/v4/internal/common"
+)
+
+func Times(percpu bool) ([]TimesStat, error) {
+ return TimesWithContext(context.Background(), percpu)
+}
+
+func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, error) {
+ return []TimesStat{}, common.ErrNotImplementedError
+}
+
+func Info() ([]InfoStat, error) {
+ 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
+}