v/vlib/runtime/runtime_nix.c.v

9 lines
188 B
V
Raw Normal View History

module runtime
fn C.sysconf(name int) i64
// nr_cpus returns the number of virtual CPU cores found on the system.
pub fn nr_cpus() int {
2022-01-19 18:29:29 +01:00
return int(C.sysconf(C._SC_NPROCESSORS_ONLN))
}