cpu

package
v0.0.0-...-503c688 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCPUUsage

func GetCPUUsage() (float64, bool)

GetCPUUsage returns the cpu usage of the current process.

Types

type Observer

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

Observer is used to observe the cpu usage of the current process.

func NewCPUObserver

func NewCPUObserver() *Observer

NewCPUObserver returns a cpu observer.

func (*Observer) Start

func (c *Observer) Start()

Start starts the cpu observer.

func (*Observer) Stop

func (c *Observer) Stop()

Stop stops the cpu observer.

Jump to

Keyboard shortcuts

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