Files
3m-ui/backend/internal/telegram/cpu_sample.go
T

12 lines
172 B
Go

package telegram
import (
"time"
"github.com/shirou/gopsutil/v4/cpu"
)
func cpuPercentSample() ([]float64, error) {
return cpu.Percent(150*time.Millisecond, false)
}