Some Comments & Questions about ANSI C
Peter da Silva
peter at ficc.uu.net
Tue Jun 13 21:39:40 AEST 1989
In article <GEOFF.89Jun11231924 at onyx.cs.warwick.ac.uk>, geoff at cs.warwick.ac.uk (Geoff Rimmer) writes:
> 3. Am I missing something, or is "difftime" the most simple function
> around? It seems to me that it is essentially a subtract.
time_t doesn't have to be an integer count of seconds. In fact, on MS-DOS
machines time_t looks pretty much like this:
Bits: 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Low word: | HOURS | MINUTES | SECONDS/2 |
High word: | YEARS-1980 | MONTHS | DAYS |
On AmigaDOS, it's three words containing days in the epoch, minutes, and
ticks (50 ticks to a second), though most compilers turn this into a UNIX
style second count if you use a UNIX-style library call.
--
Peter da Silva, Xenix Support, Ferranti International Controls Corporation.
Business: uunet.uu.net!ficc!peter, peter at ficc.uu.net, +1 713 274 5180.
Personal: ...!texbell!sugar!peter, peter at sugar.hackercorp.com.
More information about the Comp.lang.c
mailing list