mirror of
https://github.com/pestphp/pest.git
synced 2026-06-05 10:52:14 +02:00
wip
This commit is contained in:
18
src/Support/Cpu.php
Normal file
18
src/Support/Cpu.php
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user