cpu_darwin.go 594 B

1234567891011121314151617181920
  1. // +build darwin
  2. package cpu
  3. var su uint64 = 10
  4. var tu uint64 = 10
  5. func systemCPUUsage() (usage uint64, err error) {
  6. su += 1000
  7. return su, nil
  8. }
  9. func totalCPUUsage() (usage uint64, err error) {
  10. tu += 500
  11. return tu, nil
  12. }
  13. func perCPUUsage() (usage []uint64, err error) { return []uint64{10, 10, 10, 10}, nil }
  14. func cpuSets() (sets []uint64, err error) { return []uint64{0, 1, 2, 3}, nil }
  15. func cpuQuota() (quota int64, err error) { return 100, nil }
  16. func cpuPeriod() (peroid uint64, err error) { return 10, nil }
  17. func cpuMaxFreq() (feq uint64) { return 10 }