fixed crash if the user quits directly after performing a command & moved mysql_free...
[NeonServV5.git] / src / timeq.h
index 3516730a7536074d8f625c2bffaac58f6534bade..4e943b7de8003ae4d38616e6e291cb7a71889ed5 100644 (file)
@@ -1,5 +1,5 @@
-/* timeq.h - NeonServ v5.2
- * Copyright (C) 2011  Philipp Kreil (pk910)
+/* timeq.h - NeonServ v5.3
+ * Copyright (C) 2011-2012  Philipp Kreil (pk910)
  * 
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -24,16 +24,19 @@ typedef TIMEQ_CALLBACK(timeq_callback_t);
 
 struct timeq_entry {
     char *name;
-    time_t execute;
+    struct timeval execute;
     timeq_callback_t *callback;
     void *data;
     
     struct timeq_entry *next;
 };
 
+void init_timeq();
 void timeq_tick();
 struct timeq_entry* timeq_add(int seconds, timeq_callback_t *callback, void *data);
+struct timeq_entry* timeq_uadd(int useconds, timeq_callback_t *callback, void *data);
 struct timeq_entry* timeq_add_name(char *name, int seconds, timeq_callback_t *callback, void *data);
+struct timeq_entry* timeq_uadd_name(char *name, int useconds, 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);