Information about current host.
Namespaces | |
| namespace | blocking |
| Blocking functions for getting information about hosts. | |
Functions | |
| std::optional< double > | CpuLimit () |
| Returns the CPU limit. | |
| bool | IsInRtc () |
| Returns true if the current process is run in container (CPU_LIMIT environment variable is set). | |
| std::optional< double > hostinfo::CpuLimit | ( | ) |
Returns the CPU limit.
Unlike nproc and std::thread::hardware_concurrency this method considers container limits and may return fractional values.
Uses:
CPU_LIMIT=1.95c).