Article View: comp.std.c
Article #286ANSI standard for difftime()
From: scott
Date: Sat, 01 Jul 1989 02:41
Date: Sat, 01 Jul 1989 02:41
24 lines
1297 bytes
1297 bytes
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. It
declaration is.
double difftime(time_t time2, time_t time1);
and it returns time2 - time1.
My question is can this value be negative? Since elapsed time is normally
a positive value. What should difftime do if time1 is greater than time2. I
tried this under a VMS compiler and it returned a negative value. So
what is the _OFFICIAL_ ANSI standard say. Since the arguments for and
against have already been made please don't make them here. If you have
access to the PANS draft or KNOW the answer please reply. Thanx.
Scott King
trsvax!tdpvax!scott
trsvax!tdpvax!scott@uxc.cso.uiuc.edu
So when do we get to see Rocky take on the Karate kid. Or Jason take on Jaws?
Technical Details
Message-ID:
<11000001@tdpvax>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!bellcore!texbell!merch!cpe!hal6000!tdpvax!scottShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!bellcore!texbell!merch!cpe!hal6000!tdpvax!scott From: scott@tdpvax.UUCP Newsgroups: comp.std.c Subject: ANSI standard for difftime() Message-ID: <11000001@tdpvax> Date: 1 Jul 89 02:41:00 GMT Lines: 24 Nf-ID: #N:tdpvax:11000001:000:925 Nf-From: tdpvax.UUCP!scott Jun 30 21:41:00 1989