1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/runtime/runtime_windows.v
2020-01-20 17:06:36 +01:00

17 lines
276 B
V

module runtime
import os
fn nr_cpus_win() int {
mut nr := int(C.GetCurrentProcessorNumber())
if nr == 0 {
nr = os.getenv('NUMBER_OF_PROCESSORS').int()
}
return nr
}
fn nr_cpus_nix() int {
eprintln('nr_cpus_nix should be callable only for nix platforms')
return 1
}