ANSI C.

Peter da Silva peter at baylor.UUCP
Sun Jan 19 02:34:35 AEST 1986


> difftime() accepts time_t arguments but returns a double.

What's wrong with returning a long?

What's wrong with having a function:

long seconds(time)
time_t time;

Really much more generally useful, you know.

But, mainly, returning a double means loading in the floating point package.
On a lot of machines doing any floating point arithmetic in a program adds
quite a bit of overhead. Returning a long would be much more reasonable.
-- 
-- Peter da Silva
-- UUCP: ...!shell!{baylor,graffiti}!peter; MCI: PDASILVA; CIS: 70216,1076



More information about the Comp.lang.c mailing list