mirror of
https://github.com/pestphp/pest.git
synced 2026-06-05 02:52:12 +02:00
19 lines
280 B
PHP
19 lines
280 B
PHP
<?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);
|
|
}
|
|
}
|