Files
fastfetch/src/detection/cpu/cpu_bsd.c
T

19 lines
488 B
C
Raw Normal View History

2022-09-19 22:23:31 +02:00
#include "cpu.h"
2022-09-19 23:16:43 +02:00
#include "common/sysctl.h"
2022-09-19 22:23:31 +02:00
2022-09-21 17:26:10 +02:00
void ffDetectCPUImpl(FFCPUResult* cpu, bool cached)
2022-09-19 22:23:31 +02:00
{
2022-09-21 17:26:10 +02:00
cpu->temperature = FF_CPU_TEMP_UNSET;
if(cached)
return;
2022-09-19 23:16:43 +02:00
ffSysctlGetString("hw.model", &cpu->name);
cpu->coresPhysical = (uint16_t) ffSysctlGetInt("hw.ncpu", 1);
cpu->coresLogical = cpu->coresPhysical;
cpu->coresOnline = cpu->coresPhysical;
cpu->frequencyMin = ffSysctlGetInt("hw.clockrate", 0) / 1000.0;
cpu->frequencyMax = cpu->frequencyMin;
2022-09-19 22:23:31 +02:00
}