mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-26 13:48:59 +08:00

This enables using gopsutil in a codebase that gets built on other OSes than the ones supported. Instead of a build failure as before, due to the build tags, gopsutil will now throw an "not implemented" runtime error. Fixes #234.
22 lines
440 B
Go
22 lines
440 B
Go
// +build !darwin,!linux,!freebsd,!windows
|
|
|
|
package cpu
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/shirou/gopsutil/internal/common"
|
|
)
|
|
|
|
func Times(percpu bool) ([]TimesStat, error) {
|
|
return []TimesStat{}, common.ErrNotImplementedError
|
|
}
|
|
|
|
func Info() ([]InfoStat, error) {
|
|
return []InfoStat{}, common.ErrNotImplementedError
|
|
}
|
|
|
|
func Percent(interval time.Duration, percpu bool) ([]float64, error) {
|
|
return []float64{}, common.ErrNotImplementedError
|
|
}
|