[nos-bbs] Update - Timer issues in JNOS
glennt at charter.net
Wed Aug 4 13:02:02 EDT 2010
Not having looked at the code, I have to ask - will the various users
of the time have any problems with the proposed time discontinuity
they will see every 20 days? Seems like a reasonable thing to look
at. The problems may be ignorable, but it seems prudent to see if
they are infact ignorable.
73 de Glenn wb6w
At 09:51 AM 8/4/2010, you wrote:
>I'm just posting this in case anyone is interested or sees
>a flaw with the approach I'm using.
>After thinking about this a bit more, I've concluded that perhaps
>there is a much better, much easier way to do this, and one which
>involves minimal code changes.
>Changing to unsigned only fixes the problem for another 25 days, after
>a period of 52 days or so, the negative timer problem will resurface,
>since going from signed to unsigned only doubles the maximum value.
>Moving to a long will fix this on x86_64 systems, but not on i386 systems,
>since long and int are same size on those systems. I could really minimize
>the code changes by instead keeping the original code, and just resetting the
>NOS start time every 20 days, and create a '20 day counter' that will get
>bumped up every 20 days. Minimal code changes, and it will work as
>long as the 20 day counter never overflows (which it won't). The counter in
>conjunction with the start time can easily tell us the 'uptime'.
>I've already checked and if I start changing stuff from signed to unsigned
>or whatever, there is more code changes than I really care to make.
>Any comments ?
>nos-bbs mailing list
>nos-bbs at tapr.org
More information about the nos-bbs