httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <>
Subject ap_current_time() is not intuitive
Date Mon, 03 Jan 2000 18:19:02 GMT
Can we collapse the ap_current_time() function into either ap_make_time or
ap_get_curtime()? Here is how you use APR to get the current time today:

ap_make_time(&time, p);
ap_get_curtime(time, &thetime);

ap_make_time creates the ap_time_t structure. Then ap_current_time() makes
the underlying system call to initialize the ap_time_t structure. Then
ap_get_curtime returns the time in seconds since 1/1/1970.  Note that
ap_get_curtime is not getting the current time, it is getting the time from
when ap_current_time was called. This is non-intutitive as hell.

Bill Stoddard

Come to the first official Apache Software Foundation
Conference!  <http://ApacheCon.Com/>

View raw message