Skip to content

Commit

Permalink
Consistent get_cpu_count for FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
thewtex committed Aug 4, 2021
1 parent 0ca29c4 commit 96ea7dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions freebsd/cpu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit 96ea7dc

Please sign in to comment.