diff options
author | Liong Sauw Ming <ming@teluu.com> | 2011-03-16 09:22:24 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2011-03-16 09:22:24 +0000 |
commit | 623fdccd9c92fc2a00516e5cd6ed2d5edc2272a1 (patch) | |
tree | bf30cf0db67ac5c9aa3f431efdaa7d1938656a31 /pjlib/src/pj/timer.c | |
parent | 2a9988f3e4c9b8d40ffebaa4427908de29324711 (diff) |
Fixed #1211: Add pjlib API pj_gettickcount() that returns a monotonically increasing timestamp
* Changed the timer_heap to use pj_gettickcount().
* Changed ioqueue to use pj_gettickcount().
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3456 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj/timer.c')
-rw-r--r-- | pjlib/src/pj/timer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pjlib/src/pj/timer.c b/pjlib/src/pj/timer.c index 9ab3ab54..573c7ecb 100644 --- a/pjlib/src/pj/timer.c +++ b/pjlib/src/pj/timer.c @@ -465,7 +465,7 @@ PJ_DEF(pj_status_t) pj_timer_heap_schedule( pj_timer_heap_t *ht, /* Prevent same entry from being scheduled more than once */ PJ_ASSERT_RETURN(entry->_timer_id < 1, PJ_EINVALIDOP); - pj_gettimeofday(&expires); + pj_gettickcount(&expires); PJ_TIME_VAL_ADD(expires, *delay); lock_timer_heap(ht); @@ -503,7 +503,7 @@ PJ_DEF(unsigned) pj_timer_heap_poll( pj_timer_heap_t *ht, } count = 0; - pj_gettimeofday(&now); + pj_gettickcount(&now); lock_timer_heap(ht); while ( ht->cur_size && |