add api.getTime()

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12149 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2009-02-19 00:43:11 +00:00
parent 1ca5e2265e
commit 072ec6a7f2
12 changed files with 403 additions and 84 deletions
+11
View File
@@ -177,6 +177,17 @@ SWITCH_DECLARE(const char *) API::execute(const char *cmd, const char *arg)
return last_data;
}
/* we have to do this as a string because swig and languages can't find an embedded way to pass a big int */
SWITCH_DECLARE_NONSTD(char *) API::getTime(void)
{
switch_time_t now = switch_micro_time_now() / 1000;
snprintf(time_buf, sizeof(time_buf), "%" SWITCH_TIME_T_FMT, now);
return time_buf;
}
SWITCH_DECLARE(const char *) API::executeString(const char *cmd)
{
char *arg;