Draw an upside down tree of ntpd modules with packet processing on the left and OS interface on the right and data processing in the middle. (I'm handwaving. I mean the way you would draw the picture if you were explaining things rather than the actual current module structure. I think we are reasonably close.)
The packet code uses l_fp. The OS interfaces use timespec and time_t. The code in the middle works in time offsets using seconds in doubles and some time in time_t. I'm not sure that is totally correct. It seems like a good goal. I think we are close. That was the direction I was going when I got rid of a lot of time64_t a while ago and when I cleaned up the leap-second code. --------- I'd like to get rid of ntp_calendar. Nothing urgent, it just seems like we should be able to use POSIX date/time calls instead. I made some progress in the recent leap-second cleanup. One rough edge is that there is no UTC version of mktime. There is timegm, but it's not POSIX. The linux man pages says it's a GNU extension and is also available on BSDs. For the leap-second code, I used 28 days rather than 1 month. I could do that calculation with simple arithmetic. -- These are my opinions. I hate spam. _______________________________________________ devel mailing list [email protected] http://lists.ntpsec.org/mailman/listinfo/devel
