Re: current-posix-second is a disastrous mistake
Taylor R Campbell 14 Dec 2010 18:14 UTC
Date: Tue, 14 Dec 2010 11:06:35 -0500
From: John Cowan <cowan-x6Fv9fcoW1Y+uZM1RHzMvw@public.gmane.org>
They were under the influence of the maxim "Existing code matters,
existing implementations do not". They observed that the overwhelming
majority of existing applications code that made use of clock() assumed
that {leap years, non-leap years, days, hours, minutes} were exactly
{31622400s, 31536000s, 86400s, 3600s, 60s} long. Therefore, they defined
clock() to return a notion of time with the same assumptions.
Fortunately for us, the existing code that uses CURRENT-POSIX-SECOND
is not merely a minority: there is none at all.
That maxim didn't justify clock_gettime(CLOCK_REALTIME) either. And
it doesn't justify that, fifteen years after introducing another way
to see the same broken clock, POSIX still doesn't have a way to get at
a well-behaved clock, even though every operating system has one.
This is tremendously irresponsible and has doubtless cost many parties
billions of dollars sorting out the fallout of misbehaving clocks
during leap seconds.
We can do better.