3 #ifndef GCP_UTIL_PERIODICTIMER_H
4 #define GCP_UTIL_PERIODICTIMER_H
17 #include "gcp/util/common/GenericTask.h"
18 #include "gcp/util/common/GenericTaskMsg.h"
19 #include "gcp/util/common/SpawnableTask.h"
20 #include "gcp/util/common/TimeOut.h"
22 #define PERIODIC_TIMER_HANDLER(fn) void (fn)(void* args)
44 unsigned intervalInSeconds;
48 PERIODIC_TIMER_HANDLER(*fn);
53 PERIODIC_TIMER_HANDLER(*fn);
69 PERIODIC_TIMER_HANDLER(*fn_);
93 void addHandler(PERIODIC_TIMER_HANDLER(*handler),
void* args=0);
97 void removeHandler(PERIODIC_TIMER_HANDLER(*handler));
101 void enableTimer(
bool enable,
unsigned intervalInSeconds=0);
109 std::vector<Handler> handlers_;
115 void executeEnableTimer(
bool enable,
unsigned intervalInSeconds);
116 void executeAddHandler(PERIODIC_TIMER_HANDLER(*handler),
void* args=0);
117 void executeRemoveHandler(PERIODIC_TIMER_HANDLER(*handler));
128 void registerTimeOut();
139 #endif // End #ifndef GCP_UTIL_PERIODICTIMER_H
Definition: GenericTaskMsg.h:31
PeriodicTimer()
Definition: PeriodicTimer.cc:12
Definition: PeriodicTimer.h:31
Definition: SpawnableTask.h:31
Definition: HorizonsCommunicator.h:80
virtual ~PeriodicTimer()
Definition: PeriodicTimer.cc:21
Definition: PeriodicTimer.h:77
void addHandler(PERIODIC_TIMER_HANDLER(*handler), void *args=0)
Definition: PeriodicTimer.cc:97