X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=timeq.h;h=0a0694827de2fc08cf1a8a633cb1a838462d128c;hb=795115bf680185ae01043bd1222b78bfed8c1d87;hp=d683c9a52025b666a8f9054cfc7b776e94762c2d;hpb=14e50ceae9029e33cec145cbd07a79c6e1aa463b;p=NeonServV5.git diff --git a/timeq.h b/timeq.h index d683c9a..0a06948 100644 --- a/timeq.h +++ b/timeq.h @@ -3,10 +3,11 @@ #include "main.h" -#define TIMEQ_CALLBACK(NAME) int NAME(UNUSED_ARG(void *data)) +#define TIMEQ_CALLBACK(NAME) void NAME(UNUSED_ARG(void *data)) typedef TIMEQ_CALLBACK(timeq_callback_t); struct timeq_entry { + char *name; time_t execute; timeq_callback_t *callback; void *data; @@ -16,6 +17,9 @@ struct timeq_entry { void timeq_tick(); struct timeq_entry* timeq_add(int seconds, timeq_callback_t *callback, void *data); +struct timeq_entry* timeq_add_name(char *name, int seconds, timeq_callback_t *callback, void *data); int timeq_del(struct timeq_entry* entry); +int timeq_del_name(char *name); +int timeq_name_exists(char *name); #endif \ No newline at end of file