summaryrefslogtreecommitdiff
path: root/include/apr_time.h
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2008-10-20 23:35:03 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2008-10-20 23:35:03 +0000
commitac3fe8412e0b64f1754569ee16afafa79576c3fd (patch)
treede401b7fe7c75f8ffd02409873197defee585b7c /include/apr_time.h
parent93e46491aa6aa73658d0e00636c9c036b58a578d (diff)
downloadapr-ac3fe8412e0b64f1754569ee16afafa79576c3fd.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: https://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.h5
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 */