diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-20 23:35:03 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-20 23:35:03 +0000 |
commit | 973dc070399ef7adc30e78e3d3dcf09503e3b224 (patch) | |
tree | de401b7fe7c75f8ffd02409873197defee585b7c /include/apr_time.h | |
parent | e27328621028f2b4a639506e5c41093083cf9eb7 (diff) | |
download | libapr-973dc070399ef7adc30e78e3d3dcf09503e3b224.tar.gz |
A new macro for apr 1.4/2.0, for msec resolution.
- apr_time_from_sec((apr_time_t)ms / 1000) is clumsy to write
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@706458 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_time.h')
-rw-r--r-- | include/apr_time.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/apr_time.h b/include/apr_time.h index 253aa72b4..6dd70cc8d 100644 --- a/include/apr_time.h +++ b/include/apr_time.h @@ -72,7 +72,10 @@ typedef apr_int32_t apr_short_interval_time_t; /** @return apr_time_t as a msec */ #define apr_time_as_msec(time) ((time) / 1000) -/** @return a second as an apr_time_t */ +/** @return milliseconds as an apr_time_t */ +#define apr_time_from_msec(msec) ((apr_time_t)(msec) * 1000) + +/** @return seconds as an apr_time_t */ #define apr_time_from_sec(sec) ((apr_time_t)(sec) * APR_USEC_PER_SEC) /** @return a second and usec combination as an apr_time_t */ |