|
|
|
@ -46,8 +46,8 @@ TR_CLASS(TR_EventDispatcher) { |
|
|
|
TR_Hash handler; |
|
|
|
TR_EventHandler default_handler; |
|
|
|
int running; |
|
|
|
time_t heartbeat; |
|
|
|
time_t nextbeat; |
|
|
|
int heartbeat; // milliseconds |
|
|
|
int nextbeat; // milliseconds |
|
|
|
TR_EventDispatcherMode mode; |
|
|
|
}; |
|
|
|
TR_INSTANCE_INIT(TR_EventDispatcher); |
|
|
|
@ -62,9 +62,9 @@ TR_CLASSVARS_DECL(TR_EventDispatcher) { |
|
|
|
#define TR_DISPATCHER_EVENT_MAX ((size_t)TR_DISPATCHER_EVENT_SHUTDOWN) |
|
|
|
|
|
|
|
void TR_eventDispatcherRegisterHandler(TR_EventDispatcher, TR_EventHandler); |
|
|
|
void TR_eventDispatcherSetHeartbeat(TR_EventDispatcher, time_t); |
|
|
|
time_t TR_eventDispatcherGetBeatTime(TR_EventDispatcher); |
|
|
|
time_t TR_eventDispatcherGerDataWaitTime(TR_EventDispatcher); |
|
|
|
void TR_eventDispatcherSetHeartbeat(TR_EventDispatcher, int); |
|
|
|
int TR_eventDispatcherGetBeatTime(TR_EventDispatcher); |
|
|
|
int TR_eventDispatcherGerDataWaitTime(TR_EventDispatcher); |
|
|
|
void TR_eventDispatcherStart(TR_EventDispatcher); |
|
|
|
void TR_eventDispatcherShutdown(TR_EventDispatcher); |
|
|
|
|
|
|
|
|