Merge pull request #71 from thewtex/freebsd-sig

Consistent get_cpu_count for FreeBSD
This commit is contained in:
Matt McCormick 2021-08-04 17:43:16 -04:00 committed by GitHub
commit b6afa5c5e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -26,12 +26,12 @@
#include "getsysctl.h"
#include "cpu.h"
uint8_t get_cpu_count()
uint32_t get_cpu_count()
{
int32_t cpu_count = 0;
GETSYSCTL( "hw.ncpu", cpu_count );
return static_cast<uint8_t>( cpu_count );
return static_cast<uint32_t>( cpu_count );
}
float cpu_percentage( unsigned int cpu_usage_delay )