class FreeBsdSensors extends AbstractSensors {

    @Override
    public double queryCpuTemperature() {
        return queryKldloadCoretemp();
    }

    /*
     * If user has loaded coretemp module via kldload coretemp, sysctl call will return temperature
     *
     * @return Temperature if successful, otherwise NaN
     */
    private static double queryKldloadCoretemp() {<FILL_FUNCTION_BODY>}

    @Override
    public int[] queryFanSpeeds() {
        // Nothing known on FreeBSD for this.
        return new int[0];
    }

    @Override
    public double queryCpuVoltage() {
        // Nothing known on FreeBSD for this.
        return 0d;
    }
}

        String name = "dev.cpu.%d.temperature";
        try (CloseableSizeTByReference size = new CloseableSizeTByReference(FreeBsdLibc.INT_SIZE)) {
            int cpu = 0;
            double sumTemp = 0d;
            try (Memory p = new Memory(size.longValue())) {
                while (0 == FreeBsdLibc.INSTANCE.sysctlbyname(String.format(Locale.ROOT, name, cpu), p, size, null,
                        size_t.ZERO)) {
                    sumTemp += p.getInt(0) / 10d - 273.15;
                    cpu++;
                }
            }
            return cpu > 0 ? sumTemp / cpu : Double.NaN;
        }
    
<methods>public non-sealed void <init>() ,public double getCpuTemperature() ,public double getCpuVoltage() ,public int[] getFanSpeeds() ,public java.lang.String toString() <variables>private final Supplier<java.lang.Double> cpuTemperature,private final Supplier<java.lang.Double> cpuVoltage,private final Supplier<int[]> fanSpeeds