GetCpuCount Data Member Function

Returns the number of physical CPUs on the device where the application is running.

Prototype

int32 GetCpuCount()

Examples

Copy Text To Clipboard

auto BaseSystemInformation a_oBaseInfo;

auto StrList a_slMessages;
a_slMessages.AddBlank();
a_slMessages.Add( "CPU RAM: " + a_oBaseInfo.GetRam() + " MB" );
a_slMessages.Add( "CPU Count: " + a_oBaseInfo.GetCpuCount() );

for( int i = 0; i < a_oBaseInfo.GetCpuCount(); ++i )
{
   a_slMessages.Add( "Cores: " + a_oBaseInfo.GetCpuCores( i ) );
   a_slMessages.Add( "MHz: " + a_oBaseInfo.GetCpuMhz( i ) );
}

LibStrList.Out( a_slMessages );

Results

CPU RAM: 16228 MB
CPU Count: 1
Cores: 6
MHz: 2208