tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Support for tv_sec=-1 (one second before the epoch) timestamps?



    Date:        Thu, 13 Dec 2018 07:16:32 -0000 (UTC)
    From:        mlelstv%serpens.de@localhost (Michael van Elst)
    Message-ID:  <put10f$ppq$1%serpens.de@localhost>

  | time_t is signed so that it can also be used to store time differences.

That is the thinking that leads to bugs ... it is just the same as believeing
that differences between pointers is a pointer.  The difference between
times is an interval, or duration, not a time, and should not be stored in
a time_t, ever.

kre



Home | Main Index | Thread Index | Old Index