mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibCore: Implement System::hardware_concurrency on Windows
This commit is contained in:
parent
0fd0596dbf
commit
f143a9b971
|
|
@ -231,4 +231,12 @@ ErrorOr<void> sleep_ms(u32 milliseconds)
|
|||
return {};
|
||||
}
|
||||
|
||||
unsigned hardware_concurrency()
|
||||
{
|
||||
SYSTEM_INFO si = {};
|
||||
GetSystemInfo(&si);
|
||||
// number of logical processors in the current group (max 64)
|
||||
return si.dwNumberOfProcessors;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user