diff options
author | Ryan Bloom <rbb@apache.org> | 2000-01-06 19:19:31 +0000 |
---|---|---|
committer | Ryan Bloom <rbb@apache.org> | 2000-01-06 19:19:31 +0000 |
commit | 7cf6792d32dc71c3ad6f49291dd3999bc34a0f75 (patch) | |
tree | 8aa89107ea9beee714201194db4857488b73e3b7 /include | |
parent | c7a4730f6c1a266f3c09f68ddf74dabf4032b730 (diff) | |
download | apr-7cf6792d32dc71c3ad6f49291dd3999bc34a0f75.tar.gz |
Next pass at the time functions. This defines an ap_ansi_time_t which has
a specific format (seconds since 0:00:00 Jan 1, 1970). I also renamed the
(get|set)_curtime functions to (get|set)ansitime. This should make more
sense, and be a bit more intuitive.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@59575 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r-- | include/apr_time.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/apr_time.h b/include/apr_time.h index c0aff58e9..bbfda1431 100644 --- a/include/apr_time.h +++ b/include/apr_time.h @@ -65,6 +65,10 @@ extern "C" { typedef enum {APR_LOCALTIME, APR_UTCTIME} ap_timetype_e; +/* ap_ansi_time_t is defined as the number of seconds since + * 0:00:00 01/01/70. + */ +typedef ap_int64_t ap_ansi_time_t; typedef struct atime_t ap_time_t; API_VAR_IMPORT const char ap_month_snames[12][4]; @@ -80,7 +84,7 @@ ap_status_t ap_timestr(char **date_str, struct atime_t *t, ap_timetype_e type, a ap_status_t ap_strftime(char *s, ap_size_t *retsize, ap_size_t max, const char *format, ap_time_t *tm); /* accessor functions */ -ap_status_t ap_get_curtime(ap_time_t *, ap_int64_t *); +ap_status_t ap_get_ansitime(ap_time_t *, ap_ansi_time_t *); ap_status_t ap_timediff(ap_time_t *, ap_time_t *, ap_int32_t *); ap_status_t ap_get_sec(ap_time_t *, ap_int32_t *); @@ -91,7 +95,7 @@ ap_status_t ap_get_mon(ap_time_t *, ap_int32_t *); ap_status_t ap_get_year(ap_time_t *, ap_int32_t *); ap_status_t ap_get_wday(ap_time_t *, ap_int32_t *); -ap_status_t ap_set_curtime(ap_time_t *, ap_int64_t); +ap_status_t ap_set_ansitime(ap_time_t *, ap_ansi_time_t); ap_status_t ap_set_sec(ap_time_t *, ap_int32_t); ap_status_t ap_set_min(ap_time_t *, ap_int32_t); ap_status_t ap_set_hour(ap_time_t *, ap_int32_t); |