Permalink
Browse files

Use along long here Makes it work for higher CPU speeds than what my …

…puny Macs have (thanks gnachman). Wish I could find some effin’ documentation on this thing.
  • Loading branch information...
uliwitness committed Dec 22, 2013
1 parent df0f57e commit f8e68f3cf7d4abb27a95f5af7f25038dfc92f80c
Showing with 4 additions and 4 deletions.
  1. +4 −4 UKSystemInfo.m
View
@@ -85,13 +85,13 @@ long UKSystemVersion(void)
unsigned UKClockSpeed(void)
{
- unsigned count = 0;
- size_t size = sizeof(count);
+ unsigned long long count = 0;
+ size_t size = sizeof(count);
if( sysctlbyname( "hw.cpufrequency_max", &count, &size, NULL, 0 ) )
return 1;
-
- return count / 1000000;
+
+ return (unsigned) (count / 1000000ULL);
}

0 comments on commit f8e68f3

Please sign in to comment.