Back to index

courier  0.68.2
pcpdtimer.h
Go to the documentation of this file.
00001 #ifndef pcpdtimer_h
00002 #define pcpdtimer_h
00003 
00004 /*
00005 ** Copyright 2001 Double Precision, Inc.  See COPYING for
00006 ** distribution information.
00007 */
00008 
00009 
00010 #include "config.h"
00011 #include <time.h>
00012 
00013 struct PCP;
00014 
00015 struct pcpdtimer {
00016        struct pcpdtimer *next, *prev;
00017 
00018        time_t alarm;
00019        void (*handler)(struct PCP *, void *);
00020        void *voidarg;
00021 } ;
00022 
00023 extern struct pcpdtimer *first_timer, *last_timer;
00024 
00025 #define pcpdtimer_init(p) memset((p), 0, sizeof(*p))
00026 
00027 void pcpdtimer_install(struct pcpdtimer *, time_t);
00028 void pcpdtimer_triggered(struct pcpdtimer *);
00029 
00030 #endif