Time Routines


データ構造

struct  apr_time_exp_t

マクロ定義

#define APR_TIME_C(val)   APR_INT64_C(val)
#define APR_TIME_T_FMT   APR_INT64_T_FMT
#define APR_USEC_PER_SEC   APR_TIME_C(1000000)
#define apr_time_sec(time)   ((time) / APR_USEC_PER_SEC)
#define apr_time_usec(time)   ((time) % APR_USEC_PER_SEC)
#define apr_time_msec(time)   (((time) / 1000) % 1000)
#define apr_time_as_msec(time)   ((time) / 1000)
#define apr_time_from_sec(sec)   ((apr_time_t)(sec) * APR_USEC_PER_SEC)
#define apr_time_make(sec, usec)
#define APR_RFC822_DATE_LEN   (30)
#define APR_CTIME_LEN   (25)

型定義

typedef apr_int64_t apr_time_t
typedef apr_int64_t apr_interval_time_t
typedef apr_int32_t apr_short_interval_time_t
typedef apr_time_exp_t apr_time_exp_t

関数

apr_time_t apr_time_now (void)
apr_status_t apr_time_ansi_put (apr_time_t *result, time_t input)
apr_status_t apr_time_exp_tz (apr_time_exp_t *result, apr_time_t input, apr_int32_t offs)
apr_status_t apr_time_exp_gmt (apr_time_exp_t *result, apr_time_t input)
apr_status_t apr_time_exp_lt (apr_time_exp_t *result, apr_time_t input)
apr_status_t apr_time_exp_get (apr_time_t *result, apr_time_exp_t *input)
apr_status_t apr_time_exp_gmt_get (apr_time_t *result, apr_time_exp_t *input)
void apr_sleep (apr_interval_time_t t)
apr_status_t apr_rfc822_date (char *date_str, apr_time_t t)
apr_status_t apr_ctime (char *date_str, apr_time_t t)
apr_status_t apr_strftime (char *s, apr_size_t *retsize, apr_size_t max, const char *format, apr_time_exp_t *tm)
void apr_time_clock_hires (apr_pool_t *p)

変数

APR_DECLARE_DATA const char apr_month_snames [12][4]
APR_DECLARE_DATA const char apr_day_snames [7][4]

マクロ定義

#define APR_CTIME_LEN   (25)

length of a CTIME date

#define APR_RFC822_DATE_LEN   (30)

length of a RFC822 Date

#define apr_time_as_msec ( time   )     ((time) / 1000)

戻り値:
apr_time_t as a msec

#define APR_TIME_C ( val   )     APR_INT64_C(val)

mechanism to properly type apr_time_t literals

#define apr_time_from_sec ( sec   )     ((apr_time_t)(sec) * APR_USEC_PER_SEC)

戻り値:
a second as an apr_time_t

#define apr_time_make ( sec,
usec   ) 

値:

((apr_time_t)(sec) * APR_USEC_PER_SEC \
                                + (apr_time_t)(usec))
戻り値:
a second and usec combination as an apr_time_t

#define apr_time_msec ( time   )     (((time) / 1000) % 1000)

戻り値:
apr_time_t as a msec

#define apr_time_sec ( time   )     ((time) / APR_USEC_PER_SEC)

戻り値:
apr_time_t as a second

#define APR_TIME_T_FMT   APR_INT64_T_FMT

mechanism to properly print apr_time_t values

#define apr_time_usec ( time   )     ((time) % APR_USEC_PER_SEC)

戻り値:
apr_time_t as a usec

#define APR_USEC_PER_SEC   APR_TIME_C(1000000)

number of microseconds per second


型定義

typedef apr_int64_t apr_interval_time_t

intervals for I/O timeouts, in microseconds

typedef apr_int32_t apr_short_interval_time_t

short interval for I/O timeouts, in microseconds

typedef struct apr_time_exp_t apr_time_exp_t

参照:
apr_time_exp_t

typedef apr_int64_t apr_time_t

number of microseconds since 00:00:00 january 1, 1970 UTC


関数

apr_status_t apr_ctime ( char *  date_str,
apr_time_t  t 
)

apr_ctime formats dates in the ctime() format in an efficient manner. it is a fixed length format and requires the indicated amount of storage including the trailing NUL terminator. Unlike ANSI/ISO C ctime(), apr_ctime() does not include a
at the end of the string.

引数:
date_str String to write to.
t the time to convert

apr_status_t apr_rfc822_date ( char *  date_str,
apr_time_t  t 
)

apr_rfc822_date formats dates in the RFC822 format in an efficient manner. It is a fixed length format which requires the indicated amount of storage, including the trailing NUL terminator.

引数:
date_str String to write to.
t the time to convert

void apr_sleep ( apr_interval_time_t  t  ) 

Sleep for the specified number of micro-seconds.

引数:
t desired amount of time to sleep.
警告:
May sleep for longer than the specified time.

apr_status_t apr_strftime ( char *  s,
apr_size_t *  retsize,
apr_size_t  max,
const char *  format,
apr_time_exp_t tm 
)

formats the exploded time according to the format specified

引数:
s string to write to
retsize The length of the returned string
max The maximum length of the string
format The format for the time string
tm The time to convert

apr_status_t apr_time_ansi_put ( apr_time_t result,
time_t  input 
)

convert an ansi time_t to an apr_time_t

引数:
result the resulting apr_time_t
input the time_t to convert

void apr_time_clock_hires ( apr_pool_t p  ) 

Improve the clock resolution for the lifetime of the given pool. Generally this is only desireable on benchmarking and other very time-sensitive applications, and has no impact on most platforms.

引数:
p The pool to associate the finer clock resolution

apr_status_t apr_time_exp_get ( apr_time_t result,
apr_time_exp_t input 
)

Convert time value from human readable format to a numeric apr_time_t e.g. elapsed usec since epoch

引数:
result the resulting imploded time
input the input exploded time

apr_status_t apr_time_exp_gmt ( apr_time_exp_t result,
apr_time_t  input 
)

convert a time to its human readable components in GMT timezone

引数:
result the exploded time
input the time to explode

apr_status_t apr_time_exp_gmt_get ( apr_time_t result,
apr_time_exp_t input 
)

Convert time value from human readable format to a numeric apr_time_t that always represents GMT

引数:
result the resulting imploded time
input the input exploded time

apr_status_t apr_time_exp_lt ( apr_time_exp_t result,
apr_time_t  input 
)

convert a time to its human readable components in local timezone

引数:
result the exploded time
input the time to explode

apr_status_t apr_time_exp_tz ( apr_time_exp_t result,
apr_time_t  input,
apr_int32_t  offs 
)

convert a time to its human readable components using an offset from GMT

引数:
result the exploded time
input the time to explode
offs the number of seconds offset to apply

apr_time_t apr_time_now ( void   ) 

戻り値:
the current time


変数

APR_DECLARE_DATA const char apr_day_snames[7][4]

day names

APR_DECLARE_DATA const char apr_month_snames[12][4]

month names


Apacheに対してSun Jul 19 22:05:31 2009に生成されました。  doxygen 1.4.7