New config feature - time1 can declare GPS wraparound compensation

Gary E. Miller gem at rellim.com
Fri Aug 16 22:25:42 UTC 2019


Yo Sanjeev!

On Sat, 17 Aug 2019 06:21:18 +0800
Sanjeev Gupta <ghane0 at gmail.com> wrote:

> > >>> a = 8192 * 7 * 24 * 60 * 60
> > >>> "%x" % a  
> > '127500000'
> >
> > Looks like 5 bytes to me.  Is my math wrong?
> >  
> 
> No, but (long long) int is signed, so you only get to use 4 bytes. :-(

You just said long long int is 8 bytes.  Losing one bit gets you
more than 7 bytes.  We just need 5 bytes.

> > > Size of long long int: 8 bytes  

See, you said 8 bytes.  Or 7 bytes and 7 bits not counting sign.

> > Looks good to me.
> >  
> 
> My new push (on Gitlab) uses (unsigned long long) , and tests OK on
> 32-bit and 64-bit systems.

That works too.




RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20190816/fa495c4e/attachment.bin>


More information about the devel mailing list