This commit is contained in:
nuno maduro
2026-05-01 22:55:38 +01:00
parent e59b99cd73
commit 21efbc3107
4 changed files with 79 additions and 30 deletions

18
src/Support/Cpu.php Normal file
View File

@ -0,0 +1,18 @@
<?php
declare(strict_types=1);
namespace Pest\Support;
use Fidry\CpuCoreCounter\CpuCoreCounter;
/**
* @internal
*/
final class Cpu
{
public static function cores(int $fallback = 4): int
{
return (new CpuCoreCounter)->getCountWithFallback($fallback);
}
}