MCPcopy Create free account
hub / github.com/acl-dev/acl / timer_callback

Function timer_callback

lib_acl_cpp/src/master/master_base.cpp:82–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82static void timer_callback(int, ACL_EVENT* event, void* ctx)
83{
84 event_timer* timer = (event_timer*) ctx;
85
86 // ������ʱ���е����ж�ʱ����
87 acl_int64 next_delay = timer->trigger();
88
89 // �����ʱ���е�����Ϊ�ջ�δ���ö�ʱ�����ظ�ʹ�ã���ɾ����ʱ��
90 if (timer->empty() || !timer->keep_timer()) {
91 // ɾ����ʱ��
92 acl_event_cancel_timer(event, timer_callback, timer);
93 timer->destroy();
94 return;
95 }
96
97 // ��������ظ�ʹ�ö�ʱ���Ҷ�ʱ���е�����ǿգ����ٴ����øö�ʱ��
98
99 // ��Ҫ���ö�ʱ���ĵ���ʱ���
100 acl_event_request_timer(event, timer_callback, timer,
101 next_delay < 0 ? 0 : next_delay, timer->keep_timer() ? 1 : 0);
102}
103
104void master_base::set_event(ACL_EVENT* event)
105{

Callers 12

timer_callbackMethod · 0.85
timer_callbackMethod · 0.85
timer_callbackMethod · 0.85
timer_callbackMethod · 0.85
timer_callbackMethod · 0.85
timer_callbackMethod · 0.85
timer_callbackMethod · 0.85
timer_callbackMethod · 0.85
timer_callbackMethod · 0.85
timer_callbackMethod · 0.85
triggerMethod · 0.85
triggerMethod · 0.85

Calls 6

acl_event_cancel_timerFunction · 0.85
acl_event_request_timerFunction · 0.85
triggerMethod · 0.45
emptyMethod · 0.45
keep_timerMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…