summaryrefslogtreecommitdiff
path: root/apps/app_rpt.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2007-07-18 19:47:20 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2007-07-18 19:47:20 +0000
commit81bc1d7af5886089bcd065382476f202ad7cc9ea (patch)
tree540f82bac3e6105b6fc34cd4b4613c1756a7512b /apps/app_rpt.c
parentb96fde308cd75eb17e5fdb0ea6d54c0f1f593ff9 (diff)
Merge in ast_strftime branch, which changes timestamps to be accurate to the microsecond, instead of only to the second
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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));