This commit is contained in:
nuno maduro
2026-05-02 15:03:44 +01:00
parent 7d51601120
commit 4a8c2d7d78
12 changed files with 57 additions and 456 deletions

View File

@ -11,6 +11,9 @@ use Fidry\CpuCoreCounter\CpuCoreCounter;
*/
final class Cpu
{
/**
* @param int<1, max> $fallback
*/
public static function cores(int $fallback = 4): int
{
return (new CpuCoreCounter)->getCountWithFallback($fallback);