From: "Jim Jagielski" <[EMAIL PROTECTED]>
Sent: Friday, February 23, 2001 6:08 PM


> The best solution would be to abstract things out as much as
> possible. An abstract data type that contains whatever information
> we need and we pull out whatever info we want by macros or
> function calls...
> 
> apr_time_t marker;
> long seconds;
> long micro_seconds
> marker = apr_get_time(NULL);
> seconds = apr_conv_time(marker, SECONDS);
> micro_seconds = apr_conv_time(marker, MICROSECS);
> 
> as a general idea.

I find the example a bit cumbersome, but following your later comments,
that's what I propose - make apr_time_t an opaque structure and force the
user to call [relatively simple] functions that should be implemented inline
or as macros, depending on the platform.

We have enough compilers that support inlined code to catch the errors
that the macro user/coder would miss.

Reply via email to