apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <bri...@apache.org>
Subject Re: Why not POSIX time_t?
Date Mon, 15 Jul 2002 02:27:04 GMT
Aaron Bannert wrote:

>Can someone remind me what the reasons are that we don't use a struct
>with separate elements for seconds and microseconds, ala time_t?
>  
>

You're thinking of timeval; time_t is just a long int containing
seconds since the start of the epoch.

The reason we don't use a struct (timeval or any variant thereof)
is that doing addition and subtraction on the struct is much slower,
more complicated, and (if people try to do their own match on the
struct directly) more error-prone than doing the same ops on a
scalar.

--Brian



Mime
View raw message