github.com/boomhut/fiber/v2@v2.0.0-20230603160335-b65c856e57d3/internal/gopsutil/cpu/cpu_fallback.go (about) 1 //go:build !darwin && !linux && !freebsd && !openbsd && !solaris && !windows && !dragonfly 2 // +build !darwin,!linux,!freebsd,!openbsd,!solaris,!windows,!dragonfly 3 4 package cpu 5 6 import ( 7 "context" 8 "runtime" 9 10 "github.com/boomhut/fiber/v2/internal/gopsutil/common" 11 ) 12 13 func Times(percpu bool) ([]TimesStat, error) { 14 return TimesWithContext(context.Background(), percpu) 15 } 16 17 func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, error) { 18 return []TimesStat{}, common.ErrNotImplementedError 19 } 20 21 func Info() ([]InfoStat, error) { 22 return InfoWithContext(context.Background()) 23 } 24 25 func InfoWithContext(ctx context.Context) ([]InfoStat, error) { 26 return []InfoStat{}, common.ErrNotImplementedError 27 } 28 29 func CountsWithContext(ctx context.Context, logical bool) (int, error) { 30 return runtime.NumCPU(), nil 31 }