Subject: Re: [PATCH] New Patch: Implementation for IPv6 MIB:ipv6AddressTable

From: "David S. Miller" <[email-masked]>
Date: Fri, 10 Oct 2003 00:04:13 -0700

On Thu, 9 Oct 2003 13:17:35 -0700
Shirley Ma <[email-masked]> wrote:

> Which one do you think is better.
> 
> This one is too much math.
> 
> ci.cstamp = (__u32)(TIME_DELTA(ifa->cstamp, INITIAL_JIFFIES) / HZ * 100
> 		  + TIME_DELTA(ifa->cstamp, INITIAL_JIFFIES) % HZ * 100 / HZ);
> ci.tstamp = (__u32)(TIME_DELTA(ifa->tstamp, INITIAL_JIFFIES) / HZ * 100
> 		  + TIME_DELTA(ifa->tstamp, INITIAL_JIFFIES) % HZ * 100 / HZ);

Why are you using jiffies for timestamps?  I guess these values
are measured "since bootup" or something like that?

Anyways, I prefer the "too much math" because 1) it isn't a lot of
math, most of these things are constants which make the expressions
easy to compute 2) it's only done when someone asks for the information.