2019-10-11 06:36:46 +03:00
|
|
|
import runtime
|
|
|
|
|
|
|
|
fn test_nr_cpus() {
|
2019-10-11 14:16:02 +03:00
|
|
|
$if linux {
|
2019-10-12 00:54:25 +03:00
|
|
|
nr_cpus := runtime.nr_cpus()
|
|
|
|
println(nr_cpus)
|
2019-10-12 04:09:37 +03:00
|
|
|
assert nr_cpus >= 0
|
2019-10-11 14:16:02 +03:00
|
|
|
}
|
2019-10-11 06:36:46 +03:00
|
|
|
}
|