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 Thedifftime 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.

Reply via email to