Skip to content

Commit

Permalink
Merge pull request #71 from thewtex/freebsd-sig
Browse files Browse the repository at this point in the history
Consistent get_cpu_count for FreeBSD
  • Loading branch information
thewtex authored Aug 4, 2021
2 parents 0ca29c4 + 96ea7dc commit b6afa5c
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 b6afa5c

Please sign in to comment.