[ltp] Re: Re: help in troubleshooting ACPI drain with 2.6.10 please

Jan-Hendrik Benter linux-thinkpad@linux-thinkpad.org
Fri, 7 Jan 2005 16:13:44 +0100


Hi,

> > result already gives the final value:
> >
> > result = (after - before) * 3600 / seconds
>
>                             ^      ^
>
> Those are where the error is.  You're computing "result = energy * 1/time"
> when power is "energy / time".  It needs to be "result = (after - before) /
> (seconds / 3600)".

I am sorry for starting all this, because I got messed up with unit labels 
(because this is not helping to solve the real problem), but, isn't

1 / (seconds / 3600 ) <=> 1 * 3600 / seconds

Regards,

Jan-Hendrik