aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/time.h
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-11 23:25:31 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-07-11 23:25:31 +0000
commitaa699085f44e4e23de5c36b1977d8bf72dd16720 (patch)
tree18dbfc94af8342c8a0396a6ff1ba67cb42a4fef8 /include/asterisk/time.h
parent0b44d1f8e3f3d993dc1f77814ec8b6c009355270 (diff)
simplify (and document!) macro for inlinable API functions (inspired by bug #4603, with slightly different implementation)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6090 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/time.h')
-rwxr-xr-xinclude/asterisk/time.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/include/asterisk/time.h b/include/asterisk/time.h
index b34ff4f61..ec7a51d8d 100755
--- a/include/asterisk/time.h
+++ b/include/asterisk/time.h
@@ -14,22 +14,19 @@
#include <sys/time.h>
+#include "asterisk/inline_api.h"
+
/*!
* \brief Computes the difference (in milliseconds) between two \c struct \c timeval instances.
* \param end the beginning of the time period
* \param start the end of the time period
* \return the difference in milliseconds
*/
-int ast_tvdiff_ms(const struct timeval *end, const struct timeval *start);
-#if !defined(LOW_MEMORY) && !defined(AST_API_MODULE)
-extern inline
-#endif
-#if !defined(LOW_MEMORY) || defined(AST_API_MODULE)
-int ast_tvdiff_ms(const struct timeval *end, const struct timeval *start)
+AST_INLINE_API(
+int ast_tvdiff_ms(const struct timeval *end, const struct timeval *start),
{
return ((end->tv_sec - start->tv_sec) * 1000) + ((end->tv_usec - start->tv_usec) / 1000);
}
-#endif
+)
-#undef AST_API_MODULE
#endif /* _ASTERISK_TIME_H */