cpufreq

package
v0.0.0-...-e5c115e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2023 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Stats []sysfs.SystemCPUCpufreqStats
}

func (Info) AverageFreq

func (i Info) AverageFreq() unit.Frequency

func (Info) Freq

func (i Info) Freq(cpu int) unit.Frequency

func (Info) NumCPUs

func (i Info) NumCPUs() int

type Module

type Module struct {
	// contains filtered or unexported fields
}

func New

func New(provider Provider) *Module

func (*Module) Every

func (m *Module) Every(interval time.Duration) *Module

func (*Module) Output

func (m *Module) Output(format func(Info) bar.Output) *Module

func (*Module) Refresh

func (m *Module) Refresh()

func (*Module) Stream

func (m *Module) Stream(s bar.Sink)

type Provider

type Provider interface {
	GetCPUFrequency() (Info, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL