httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <>
Subject Re: ap_current_time() is not intuitive
Date Wed, 05 Jan 2000 16:08:35 GMT
oh weird Ryan, this is totally confusing.

you've got:
  ap_status_t ap_get_fileatime(time_t *, ap_file_t *);

which uses the unix time_t.

and you've also got:
  ap_status_t ap_get_curtime(ap_time_t *, ap_int64_t *);

which uses an unnamed type!

i think we should take another hint from NSPR here (see, and we should

  /* microseconds since the epoch (00:00:00 jan 1, 1970 UTC) */
  typedef ap_int64_t ap_time_t;


  /* "exploded time" ... or use another name for it */
  struct ap_tm ap_tm_t;

the exploded time is really only for human consumption, it shouldn't be
the default returned by functions such as "time(0)" or whatever the "get
the time now" function happens to be.  that's far too much computation for
such a commonly used function.

the functions such as ap_get_fileatime would take an ap_time_t *, and
there would be a function equivalent to time(0) for getting the current
time as an ap_time_t.


View raw message