aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_rpt.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-18 19:47:20 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-18 19:47:20 +0000
commit74c2948c2299773fd3816af43e06e3bdf714ba3a (patch)
tree540f82bac3e6105b6fc34cd4b4613c1756a7512b /apps/app_rpt.c
parentfd471b4a0cbb2abd7b4c8f30fee850cedefedaa1 (diff)
Merge in ast_strftime branch, which changes timestamps to be accurate to the microsecond, instead of only to the second
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75706 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_rpt.c')
-rw-r--r--apps/app_rpt.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/app_rpt.c b/apps/app_rpt.c
index 70badd255..c81fbbdb0 100644
--- a/apps/app_rpt.c
+++ b/apps/app_rpt.c
@@ -587,6 +587,7 @@ static void rpt_mutex_spew(void)
int i, j;
long long diff;
char a[100] = "";
+ struct ast_tm tm;
struct timeval lasttv;
ast_mutex_lock(&locklock);
@@ -597,8 +598,8 @@ static void rpt_mutex_spew(void)
lasttv.tv_sec = lasttv.tv_usec = 0;
for (i = 0; i < 32; i++) {
j = (i + lock_ring_index_copy) % 32;
- strftime(a, sizeof(a) - 1, "%m/%d/%Y %H:%M:%S",
- localtime(&lock_ring_copy[j].tv.tv_sec));
+ ast_strftime(a, sizeof(a) - 1, "%m/%d/%Y %H:%M:%S",
+ ast_localtime(&lock_ring_copy[j].tv, &tm, NULL));
diff = 0;
if (lasttv.tv_sec) {
diff = (lock_ring_copy[j].tv.tv_sec - lasttv.tv_sec) * 1000000;
@@ -1890,7 +1891,7 @@ static void *rpt_tele_thread(void *this)
struct ast_channel *mychannel;
const char *p, *ct;
time_t t;
- struct tm localtm;
+ struct ast_tm localtm;
#ifdef APP_RPT_LOCK_DEBUG
struct lockthread *t;
#endif
@@ -5619,7 +5620,7 @@ static void queue_id(struct rpt *myrpt)
static void do_scheduler(struct rpt *myrpt)
{
int res;
- struct tm tmnow;
+ struct ast_tm tmnow;
memcpy(&myrpt->lasttv, &myrpt->curtv, sizeof(struct timeval));