Ignore:
Timestamp:
Mar 16, 2011 9:22:24 AM (13 years ago)
Author:
ming
Message:

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().
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/os_timestamp_common.c

    r2560 r3456  
    189189} 
    190190 
     191PJ_DEF(pj_status_t) pj_gettickcount(pj_time_val *tv) 
     192{ 
     193    pj_timestamp ts, start; 
     194    pj_status_t status; 
     195 
     196    if ((status = pj_get_timestamp(&ts)) != PJ_SUCCESS) 
     197        return status; 
     198 
     199    pj_set_timestamp32(&start, 0, 0); 
     200    *tv = pj_elapsed_time(&start, &ts); 
     201 
     202    return PJ_SUCCESS; 
     203} 
     204 
    191205#endif  /* PJ_HAS_HIGH_RES_TIMER */ 
    192206 
Note: See TracChangeset for help on using the changeset viewer.