ANSI standard for difftime()
david.f.prosser
dfp at cbnewsl.ATT.COM
Thu Jul 6 06:57:33 AEST 1989
In article <11000001 at tdpvax> scott at tdpvax.UUCP writes:
>
>
>I have a copy of _The Waite Group's Essential Guide to ANSI C_ and it has
>difftime() defined as the __elapsed__ time between to time_t values.
>
>My question is can this value be negative?
The pANS says ``The difftime function computes [and returns] the
difference [in seconds] between two calendar times: time1 - time0,''
where the declaration is given as
double difftime(time_t time1, time_t time0);
So there is no implication of an ordering of the two times.
Dave Prosser ...not an official X3J11 answer...
More information about the Comp.std.c
mailing list