1
0
Fork 0
golang-github-gofiber-fiber/internal/gopsutil/cpu/cpu_fallback.go
Daniel Baumann 6d002e9543
Adding upstream version 2.52.6.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-05-17 06:50:16 +02:00

30 lines
743 B
Go

//go:build !darwin && !linux && !freebsd && !openbsd && !solaris && !windows && !dragonfly
package cpu
import (
"context"
"runtime"
"github.com/gofiber/fiber/v2/internal/gopsutil/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
}