🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #289

Re: ANSI standard for difftime()

#289
From: david.f.prosser
Date: Wed, 05 Jul 1989 20:57
17 lines
992 bytes
In article <11000001@tdpvax> scott@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...
Technical Details
Message-ID: <1004@cbnewsl.ATT.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!att!cbnewsl!dfp
References: <11000001@tdpvax>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!att!cbnewsl!dfp
From: dfp@cbnewsl.ATT.COM (david.f.prosser)
Newsgroups: comp.std.c
Subject: Re: ANSI standard for difftime()
Message-ID: <1004@cbnewsl.ATT.COM>
Date: 5 Jul 89 20:57:33 GMT
References: <11000001@tdpvax>
Reply-To: dfp@cbnewsl.ATT.COM (david.f.prosser)
Organization: AT&T Bell Laboratories
Lines: 17