diff options
| author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-06-10 22:29:59 +0000 |
|---|---|---|
| committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-06-10 22:29:59 +0000 |
| commit | 695644d0c479228feb92e2cd9501d15819778c24 (patch) | |
| tree | ec3389db1a9fa7a957618d1a02765a4df3c79aa0 /include/timeout.h | |
| parent | c8c89c7af098ad8825309dea4e118413b368a1d6 (diff) | |
New timer infrastructure, can be used inside modules. Replaces old ENFORCE/COLLIDE/inhabit timers, too. Patch by Adam.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2317 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include/timeout.h')
| -rw-r--r-- | include/timeout.h | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/include/timeout.h b/include/timeout.h index 71b26de10..e69de29bb 100644 --- a/include/timeout.h +++ b/include/timeout.h @@ -1,45 +0,0 @@ -/* Time-delay routine include stuff. - * - * (C) 2003-2009 Anope Team - * Contact us at team@anope.org - * - * Please read COPYING and README for furhter details. - * - * Based on the original code of Epona by Lara. - * Based on the original code of Services by Andy Church. - * - * $Id$ - * - */ - -#ifndef TIMEOUT_H -#define TIMEOUT_H - -#include <time.h> - - -/* Definitions for timeouts: */ -typedef struct timeout_ Timeout; -struct timeout_ { - Timeout *next, *prev; - time_t settime, timeout; - int repeat; /* Does this timeout repeat indefinitely? */ - void (*code)(Timeout *); /* This structure is passed to the code */ - void *data; /* Can be anything */ -}; - - -/* Check the timeout list for any pending actions. */ -extern void check_timeouts(); - -/* Add a timeout to the list to be triggered in `delay' seconds. Any - * timeout added from within a timeout routine will not be checked during - * that run through the timeout list. - */ -extern Timeout *add_timeout(int delay, void (*code)(Timeout *), int repeat); - -/* Remove a timeout from the list (if it's there). */ -extern void del_timeout(Timeout *t); - - -#endif /* TIMEOUT_H */ |
