GetCpuMhz Data Member Function

Returns the operating speed in MHz of the CPU at the specified index.

Prototype

int32 GetCpuMhz( int32 p_nIndex )

Parameters

Parameter Type Parameter Name Documentation
int32p_nIndexThe index of the CPU to query.

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