g...@rellim.com said: > I'm gonna go with this for now, it seems pretty hard to misunderstand: > #define NS_PER_S 1000000000 > #define S_PER_NS 1e-9 > DItto for other units.
Looks good to me. An alternative hack is to undef NANOSECOND in the top of timespecops.h #include "ntp_calendar.h" #include "timetoa.h" +#ifdef NANOSECOND + /* from sys/timex.h on NetBSD and FreeBSD */ +# undef NANOSECOND +#endif /* milliseconds per second */ #define MILLISECONDS 1000 I'm testing that now. I'll happily switch to your version. I want something that works so I can verify that my recent changes to leapsecond didn't break anything gross on NetBSD and FreeBSD. -------- refclock_atom.h used to contain: #undef NANOSECOND /* some systems define it differently */ #define NANOSECOND 1000000000 /* one second (ns) */ ------- > I see no preactical reason for a fefine of 1e9 as NS_PER_S will do fine for > that too. I can't figure out what that means. Is 1e9 floating point? I'd use the lots of zeros form if I was trying to emphasize that it was an integer. -- These are my opinions. I hate spam. _______________________________________________ devel mailing list devel@ntpsec.org http://lists.ntpsec.org/mailman/listinfo/devel