Changeset 36 for pjproject/main/pjlib/include/pj/timer.h
- Timestamp:
- Nov 9, 2005 3:37:19 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/main/pjlib/include/pj/timer.h
r4 r36 111 111 112 112 /** 113 * Default flag for timer heap, indicates that synchronization will be114 * used.115 */116 #define PJ_TIMER_HEAP_SYNCHRONIZE (0)117 118 /**119 * Flag to indicate that thread synchronization is NOT needed for the120 * timer heap.121 */122 #define PJ_TIMER_HEAP_NO_SYNCHRONIZE (1)123 124 /**125 113 * Calculate memory size required to create a timer heap. 126 114 * … … 141 129 * initially. If the application registers more entries 142 130 * during runtime, then the timer heap will resize. 143 * @param flag Creation flag, currently only PJ_TIMER_HEAP_NO_SYNCHRONIZE144 * is recognized..145 131 * @param ht Pointer to receive the created timer heap. 146 132 * … … 149 135 PJ_DECL(pj_status_t) pj_timer_heap_create( pj_pool_t *pool, 150 136 pj_size_t count, 151 unsigned flag,152 137 pj_timer_heap_t **ht); 138 139 /** 140 * Destroy the timer heap. 141 * 142 * @param ht The timer heap. 143 */ 144 PJ_DECL(void) pj_timer_heap_destroy( pj_timer_heap_t *ht ); 145 146 147 /** 148 * Set lock object to be used by the timer heap. By default, the timer heap 149 * uses dummy synchronization. 150 * 151 * @param ht The timer heap. 152 * @param lock The lock object to be used for synchronization. 153 * @param auto_del If nonzero, the lock object will be destroyed when 154 * the timer heap is destroyed. 155 */ 156 PJ_DECL(void) pj_timer_heap_set_lock( pj_timer_heap_t *ht, 157 pj_lock_t *lock, 158 pj_bool_t auto_del ); 159 160 /** 161 * Set maximum number of timed out entries to process in a single poll. 162 * 163 * @param ht The timer heap. 164 * @param count Number of entries. 165 * 166 * @return The old number. 167 */ 168 PJ_DECL(unsigned) pj_timer_heap_set_max_timed_out_per_poll(pj_timer_heap_t *ht, 169 unsigned count ); 153 170 154 171 /** … … 216 233 */ 217 234 PJ_DECL(pj_status_t) pj_timer_heap_earliest_time( pj_timer_heap_t *ht, 218 pj_time_val *timeval);235 pj_time_val *timeval); 219 236 220 237 /** … … 222 239 * each of the expired timers. 223 240 * 224 * @param ht The timer heap.241 * @param ht The timer heap. 225 242 * @param next_delay If this parameter is not NULL, it will be filled up with 226 243 * the time delay until the next timer elapsed, or -1 in 227 244 * the sec part if no entry exist. 228 * @return The number of timers expired. 229 */ 230 PJ_DECL(int) pj_timer_heap_poll( pj_timer_heap_t *ht, pj_time_val *next_delay); 245 * 246 * @return The number of timers expired. 247 */ 248 PJ_DECL(unsigned) pj_timer_heap_poll( pj_timer_heap_t *ht, 249 pj_time_val *next_delay); 231 250 232 251 /**
Note: See TracChangeset
for help on using the changeset viewer.