BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJLIB Reference

pj_timer_entry Struct Reference

#include <timer.h>

Data Fields

void * user_data
 
int id
 
pj_timer_heap_callbackcb
 
pj_timer_id_t _timer_id
 
pj_time_val _timer_value
 
pj_grp_lock_t_grp_lock
 

Detailed Description

This structure represents an entry to the timer.

Field Documentation

◆ _grp_lock

pj_grp_lock_t* pj_timer_entry::_grp_lock

Internal: the group lock used by this entry, set when pj_timer_heap_schedule_w_lock() is used.

◆ _timer_id

pj_timer_id_t pj_timer_entry::_timer_id

Internal unique timer ID, which is assigned by the timer heap. Positive values indicate that the timer entry is running, while -1 means that it's not. Any other value may indicate that it hasn't been properly initialised or is in a bad state. Application should not touch this ID.

◆ _timer_value

pj_time_val pj_timer_entry::_timer_value

The future time when the timer expires, which the value is updated by timer heap when the timer is scheduled.

◆ cb

pj_timer_heap_callback* pj_timer_entry::cb

Callback to be called when the timer expires.

◆ id

int pj_timer_entry::id

Arbitrary ID assigned by the user/owner of this entry. Applications can use this ID to distinguish multiple timer entries that share the same callback and user_data.

◆ user_data

void* pj_timer_entry::user_data

User data to be associated with this entry. Applications normally will put the instance of object that owns the timer entry in this field.


The documentation for this struct was generated from the following file:

 


PJLIB Open Source, high performance, small footprint, and very very portable framework
Copyright (C) 2006-2009 Teluu Inc.