Subject: Re: Sleazy timing code
To: Hal Murray <firstname.lastname@example.org>
From: Jukka Marin <email@example.com>
Date: 05/30/2000 14:19:46
On Tue, May 30, 2000 at 03:25:05AM -0700, Hal Murray wrote:
> I have some sleazy code that I use to measure CPU usage. The idea
> is to run a low priority job that eats up all the otherwise unused
> CPU cycles. The ones it doesn't get were obviously "used" by something.
Umm.. I'm not familiar with all the CPU architectures supported by NetBSD,
but the CPU's usually have power-saving modes which may reduce the power
consumption to a fraction of the normal level. Wouldn't an idle loop like
this keep the CPU fully (well, almost) active all the time, raising the
power consumption to normal levels?
I don't know about the others, but my computers produce more than enough
heat (and noise) as is, and my laptop's battery doesn't last too long,
While I did a similar idle loop on the Amiga to measure CPU idle time,
I'm now against this because I'm paying my electricity bills myself :-)
Just IMHO, of course.