Fix for cpu sysctl failing on 64bit FreeBSD
same as commit 80d70b7a4d5ee9a4ba79deae0e840c65ccaf4131
This commit is contained in:
parent
869d43f102
commit
cf2a094f13
@ -28,8 +28,13 @@
|
||||
|
||||
float cpu_percentage( unsigned int cpu_usage_delay )
|
||||
{
|
||||
int32_t load1[CPUSTATES];
|
||||
int32_t load2[CPUSTATES];
|
||||
#if __x86_64__ || __ppc64__
|
||||
u_int64_t load1[CPUSTATES];
|
||||
u_int64_t load2[CPUSTATES];
|
||||
#else
|
||||
u_int32_t load1[CPUSTATES];
|
||||
u_int32_t load2[CPUSTATES];
|
||||
#endif
|
||||
|
||||
GETSYSCTL( "kern.cp_time", load1 );
|
||||
usleep( cpu_usage_delay );
|
||||
|
Loading…
Reference in New Issue
Block a user