Xinqi Bao's Git
1 /* See LICENSE file for copyright and license details. */
5 #include <sys/sysctl.h>
7 #include "../../util.h"
20 if (sysctl(mib
, 2, &freq
, &size
, NULL
, 0) == -1) {
21 fprintf(stderr
, "sysctl 'HW_CPUSPEED': %s\n", strerror(errno
));
25 return bprintf("%d", freq
);