cpu_windows.go 293 B

123456789101112131415
  1. package cpu
  2. import (
  3. "time"
  4. )
  5. // ProbeCPUs fallback that always determines that the CPU limits are not reached
  6. func ProbeCPUs(probeTime time.Duration, maxCPUUsage float64, abort chan struct{}) bool {
  7. select {
  8. case <-abort:
  9. return false
  10. case <-time.After(probeTime):
  11. return true
  12. }
  13. }