Improve GHz speed accuracy, thanks to Axel for suggesting this.

(And, yes, that's stupid little commits, but I'm so bored at office *and* without any BeOS system to test...)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13529 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Houdoin
2005-07-07 13:19:33 +00:00
parent f61388497c
commit 3306648a89
+1 -1
View File
@@ -217,7 +217,7 @@ NormalPulseView::Draw(BRect rect)
// Draw processor type and speed
char buf[500];
int cpu_speed = CalculateCPUSpeed();
if (cpu_speed > 1000)
if (cpu_speed > 1000 && (cpu_speed % 10) == 0)
sprintf(buf, "%.2f GHz", cpu_speed / 1000.0f);
else
sprintf(buf, "%d MHz", cpu_speed);