github.com/zhuohuang-hust/src-cbuild@v0.0.0-20230105071821-c7aab3e7c840/pkg/sysinfo/numcpu.go (about)

     1  // +build !linux,!windows
     2  
     3  package sysinfo
     4  
     5  import (
     6  	"runtime"
     7  )
     8  
     9  // NumCPU returns the number of CPUs
    10  func NumCPU() int {
    11  	return runtime.NumCPU()
    12  }