2019-10-11 05:36:46 +02:00
|
|
|
import runtime
|
|
|
|
|
|
|
|
fn test_nr_cpus() {
|
2019-10-11 13:16:02 +02:00
|
|
|
$if linux {
|
2019-10-11 23:54:25 +02:00
|
|
|
nr_cpus := runtime.nr_cpus()
|
|
|
|
println(nr_cpus)
|
|
|
|
assert nr_cpus > 0
|
2019-10-11 13:16:02 +02:00
|
|
|
}
|
2019-10-11 05:36:46 +02:00
|
|
|
}
|