> > I really don't get the cruscade agains gettimeofday().  Despite what
> > POSIX may say, it is not going away.  And what you're proposing isn't
> > really an optimization.  As far as I'm concerned this is just
> > (unwanted) churn.
> 
> I don't think there's a crusade here; time(3) gives us shorter code in
> auth_unix.c, and still uses gettimeofday(2) under the hood.  The two
> other diffs are dead code removal.  I think it's worth it, ok jca@

time(3) is not actually shorter code.  It is a deeper function call;
it is running more instructions.  At runtime it isn't shorter code,
and the visible aspect is irrelevant since I have to hunt for the
sub-second initialization.

Since timespecs also use tv_* prefixes, a hint about the other sub-second
field is being lost, also, sometimes the clearing of the sub-second field
isn't in the same place it is missing.

To my mind it is strange because around 20 years ago I audited the tree
and used time() calls to spot ancient code or inaccurate range handling,
and changed many to gettimeofday().  Now they'll get changed back?

So no... I don't like these changes to time().

Reply via email to