httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Jones <JON...@er6s1.eng.ohio-state.edu>
Subject Re: ap_current_time() is not intuitive
Date Mon, 03 Jan 2000 17:47:32 GMT
In message <005701bf5617$03680b10$064b2509@raleigh.ibm.com>,
  Bill Stoddard <stoddard@raleigh.ibm.com> writes:
>
>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_current_time(time);
>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.

Why not rename ap_get_curtime() to something more descriptive of what it
is actually doing (converting a time value from one representation to another)?
I don't have a good suggestion because I don't know the preferred short-hand
way of saying 'seconds since 1/1/1970', which I always just called 'unix time'.

-----------------------------------------------------------------------------
David L. Jones               |      Phone:    (614) 292-6929
Ohio State University        |      Internet:
140 W. 19th St. Rm. 231a     |               jonesd@er6s1.eng.ohio-state.edu
Columbus, OH 43210           |               vman+@osu.edu

Mime
View raw message