1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/runtime/runtime_nix.c.v
2022-01-19 19:29:29 +02:00

9 lines
188 B
V

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 {
return int(C.sysconf(C._SC_NPROCESSORS_ONLN))
}