B
Beej Jorgensen
That got me thinking:
time_t is an arithmetic type, and so the '-' operator will work on it.
But difftime() exists because there's nothing in the Standard that
specifies the encoding of a time_t variable, so this might BE true:
(t1 - t0) != difftime(t1, t0)
is this line of thinking correct?
Is this was the Rationale means when it says, "No arithmetic properties
of [clock_t and time_t] are defined by the Standard", that is, "When you
difftime() time 7 from time 10, you might not get time 3, even though
you will get 3 when you use the '-' operator."
-Beej
time_t is an arithmetic type, and so the '-' operator will work on it.
But difftime() exists because there's nothing in the Standard that
specifies the encoding of a time_t variable, so this might BE true:
(t1 - t0) != difftime(t1, t0)
is this line of thinking correct?
Is this was the Rationale means when it says, "No arithmetic properties
of [clock_t and time_t] are defined by the Standard", that is, "When you
difftime() time 7 from time 10, you might not get time 3, even though
you will get 3 when you use the '-' operator."
-Beej