OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / freeswan / pluto / timer.h
1 /* timing machinery
2  * Copyright (C) 1998-2001  D. Hugh Redelmeier.
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the
6  * Free Software Foundation; either version 2 of the License, or (at your
7  * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12  * for more details.
13  *
14  * RCSID $Id: timer.h,v 1.14 2002/01/21 03:14:23 dhr Exp $
15  */
16
17 extern time_t now(void);        /* careful version of time(2) */
18
19 struct state;   /* forward declaration */
20
21 struct event
22 {
23     time_t          ev_time;
24     int             ev_type;        /* Event type */
25     struct state   *ev_state;       /* Pointer to relevant state (if any) */
26     struct event   *ev_next;        /* Pointer to next event */
27 };
28
29 extern void event_schedule(enum event_type type, time_t tm, struct state *st);
30 extern void handle_timer_event(void);
31 extern long next_event(void);
32 extern void delete_event(struct state *st);
33 extern void delete_dpd_event(struct state *st);