At 07:34 PM 7/11/2002, Justin Erenkrantz wrote:
Not quite opaque in that you can still compute deltas via a subtraction, but that to understand the quantities, you must place it through a function/macro. Brian has already converted httpd to this model. -- justin
OK... after much hand waving today... #apr channel folks have come up with an interesting idea that might make all happy.
IF we adopt apr_butime_t to represent a time (epoch 1.1.1970) and also adopt apr_busec_t to represent any interval, timeout or other delta (not rooted to an epoch) ... both declared as 64bit values, would that satisfy everyone?
AND if we create apr_busec_short_t to represent <34 min 8 sec, which is the precision of a 32 bit signed busec value, we could replace the old apr_interval_t.
This isn't a consensus just yet, please comment on your thoughts.
BTW: to Roy Fielding; consider that these types are simply unions to the struct;
int sec:44 int busec:20
Which is more compact, yet the same sort of structure you desired. What your compiler does with this is anyone's guess :-)
Bill