🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #6197

ANSI C date & time library functions.

#6197
From: Speaker-To-Animals
Date: Tue, 06 Feb 1990 11:25
18 lines
1129 bytes
I am writing an implementation of the ANSI C date and time functions.
Unfortunately, I don't have a copy of the standard itself yet, so I'm
working from K&R2.  time_t is described as a scalar type.  difftime() returns
the difference between two times as a double.  If time_t represents a time
in centiseconds (say), a 32-bit unsigned value will cover a period of a year
or so.  Are times more precise than 1 second only possible in implementations 
with greater than 32 bit integers?  Since time() returns -1 if the time is
not available, it doesn't seem possible to define time_t as an array of
integers.
--
Dave Allen
Monotype International ADG
Science Park
Milton Road
Cambridge CB4 4FQ
England

dave@moncam.UUCP
Technical Details
Message-ID: <DAVE.90Feb6112502@marvin.moncam.co.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!acorn!moncam!dave

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!acorn!moncam!dave
From: dave@moncam.co.uk (Speaker-To-Animals)
Newsgroups: comp.std.c
Subject: ANSI C date & time library functions.
Message-ID: <DAVE.90Feb6112502@marvin.moncam.co.uk>
Date: 6 Feb 90 11:25:02 GMT
Sender: dave@moncam.co.uk
Distribution: comp
Organization: Monotype ADG, Cambridge, UK.
Lines: 18