MESSAGE
DATE | 2012-02-24 |
FROM | Paul Robert Marino
|
SUBJECT | Subject: [NYLXS - HANGOUT] Re: c++ question about decimals
|
actually after looking into this further what i really need to do is grab just the remainder of the result of dividing 2 numbers I think fmod is the answer im looking for
On Fri, Feb 24, 2012 at 12:48 AM, Paul Robert Marino wrote: > my C programmings a little rusty and i could use some help > im working on a patch for keepalived i have to modify a portion of the > code that type casts several variables as a unsigned long however I > need to change it to an equivalent the will store it with a decimal > with 2 points of precision, and if possible wont change how other > parts of the code use the same functions with whole numbers does any > one have any suggestions. > > by the way in case any one is wondering im working on implementing > centisecond (hundredth) of a second intervals for VRRP per the RFC for > VRRPv3 http://tools.ietf.org/html/rfc5798 > so far its going well but there are a few points in the code that are > doing crazy things like setting a sleep timer to 0 seconds which is > what I'm trying to fix now. that being said the rest of the patch > works great i was able to cut my interface failover times in nearly > down from 8 to less than 3 seconds total.
|
|