Re: [RFC][PATCH] new timeofday core subsystem (v.A0)

john stultz
2004-09-03T19:23:52Z

On Thu, 2004-09-02 at 23:42, Albert Cahalan wrote:
> > > +int ntp_leapsecond(struct timespec now)
> > > +{
> > > + /*
> > > + * Leap second processing. If in leap-insert state at
> > > + * the end of the day, the system clock is set back one
> > > + * second; if in leap-delete state, the system clock is
> > > + * set ahead one second. The microtime() routine or
> > > + * external clock driver will insure that reported time
> > > + * is always monotonic. The ugly divides should be
> > > + * replaced.
>
> Don't optimize until the patch is in and stable.
> The divides can be removed much later. Wait months,
> if not forever, before making the code less readable.
>
> The same goes for arch-specific non-syscall hacks.

Yep. Code readability is crucial, although performance is also a concern
that *has* to be addressed.

As much as I'm probably digging myself a hole in doing all of this, I
really don't want to work on time for the rest of my life, so making the
code clear and readable is my only hope for passing this on. :)

-john