/NumCPULib4Pascal

Get the number of CPUs in Pascal

Primary LanguagePascalMIT LicenseMIT

NumCPULib4Pascal

Count the number of CPUs (Logical and Physical) on the current machine.

Build Status Build Status

Usage

Add NumCPULib to uses clause:

uses
  NumCPULib;

var
  lcc, pcc: Int32;
begin
// count logical cpus (aka logical processors)
 lcc := TNumCPULib.GetLogicalCPUCount();
// count physical cpus (aka cores)
 pcc := TNumCPULib.GetPhysicalCPUCount();
end;