Discarded unused variable "at" in get_rounded_cpu_speed().

Forgot to adapt the limit to switch to "GHz" in AboutHaiku.
Both bugs were reported by Herve W a.k.a. "V" - whatever
that means :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13571 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-07-10 16:24:52 +00:00
parent f877fb742f
commit a98b74b72e
2 changed files with 2 additions and 5 deletions
+1 -4
View File
@@ -214,15 +214,12 @@ get_rounded_cpu_speed(void)
int target = sys_info.cpu_clock_speed / 1000000;
int frac = target % 100;
int delta = -frac;
int at = 0;
int freqs[] = { 100, 50, 25, 75, 33, 67, 20, 40, 60, 80, 10, 30, 70, 90 };
for (uint x = 0; x < sizeof(freqs) / sizeof(freqs[0]); x++) {
int ndelta = freqs[x] - frac;
if (abs(ndelta) < abs(delta)) {
at = freqs[x];
if (abs(ndelta) < abs(delta))
delta = ndelta;
}
}
return target + delta;
}
+1 -1
View File
@@ -208,7 +208,7 @@ AboutView::AboutView(const BRect &r)
r.bottom = r.top + textHeight;
int32 clockSpeed = get_rounded_cpu_speed();
if (clockSpeed < 1000000000)
if (clockSpeed < 1000)
sprintf(string,"%ld MHz", clockSpeed);
else
sprintf(string,"%.2f GHz", clockSpeed / 1000.0f);