Added user friendly Ghz awareness :-).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13521 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -216,7 +216,11 @@ NormalPulseView::Draw(BRect rect)
|
|||||||
|
|
||||||
// Draw processor type and speed
|
// Draw processor type and speed
|
||||||
char buf[500];
|
char buf[500];
|
||||||
sprintf(buf, "%d MHz", CalculateCPUSpeed());
|
int cpu_speed = CalculateCPUSpeed();
|
||||||
|
if (cpu_speed > 1000)
|
||||||
|
sprintf(buf, "%.2f Ghz", cpu_speed / 1000.0f);
|
||||||
|
else
|
||||||
|
sprintf(buf, "%d MHz", cpu_speed);
|
||||||
SetDrawingMode(B_OP_OVER);
|
SetDrawingMode(B_OP_OVER);
|
||||||
SetHighColor(240, 240, 240);
|
SetHighColor(240, 240, 240);
|
||||||
SetFontSize(fProcessorFontSize);
|
SetFontSize(fProcessorFontSize);
|
||||||
|
|||||||
Reference in New Issue
Block a user