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?




The difference between times is an interval, or duration, not a time,
and should not be stored in a time_t, ever.
So, what type _should_ be used for it?

7.27.2.2 The difftime function

Synopsis

     #include <time.h>
     double difftime(time_t time1, time_t time0);

Description

The difftime function computes the difference between two calendar times: time1 - time0.

Returns

The difftime function returns the difference expressed in seconds as a double.



Home | Main Index | Thread Index | Old Index