Pivoting
Hal Murray
hmurray at megapathdsl.net
Sat Apr 22 05:09:18 UTC 2017
More pivoting....
pylib calls ntp.ntpc.lfptofloat() in several places
ntpc_lfptofloat() calls lfp_stamp_to_tspec()
That's an inline which calls ntpcal_ntp_to_time()
ntpcal_ntp_to_time takes an optional second argument, the pivot time.
If it's NULL, it uses "now".
-----------------
The code in step_systime() is really really ugly. (to my eye)
It starts by computing the pivot. It gets the build time as a broken down
struct, subtracts 10 years, converts back to a time_t. All that can be
precomputed.
It converts the step to a l_fp, gets the system time as a tspec, converts
that to l_fp, adds them together, then converts back to a tspec. That
convert back uses the pivot.
Now that we have a nice simple EPOCH, I hope somebody cleans that up.
Does the 10 year step back make any sense?
--
These are my opinions. I hate spam.
More information about the devel
mailing list