Windows: stats support
Signed-off-by: John Howard <jhoward@microsoft.com> Upstream-commit: 340e5233b2fb95981ddea610c1667134ed3b2376 Component: engine
This commit is contained in:
@ -50,3 +50,9 @@ func runtimeArchitecture() (string, error) {
|
||||
return "", fmt.Errorf("Unknown processor architecture")
|
||||
}
|
||||
}
|
||||
|
||||
// NumProcs returns the number of processors on the system
|
||||
func NumProcs() uint32 {
|
||||
syscall.Syscall(procGetSystemInfo.Addr(), 1, uintptr(unsafe.Pointer(&sysinfo)), 0, 0)
|
||||
return sysinfo.dwNumberOfProcessors
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user