]> git.mxchange.org Git - flightgear.git/blob - Time/event.h
Changed #ifdef FILE_H to #ifdef _FILE_H
[flightgear.git] / Time / event.h
1 /**************************************************************************
2  * event.h -- Flight Gear periodic event scheduler
3  *
4  * Written by Curtis Olson, started December 1997.
5  *
6  * Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License as
10  * published by the Free Software Foundation; either version 2 of the
11  * License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21  *
22  * $Id$
23  * (Log is kept at end of this file)
24  **************************************************************************/
25
26
27 #ifndef _EVENT_H
28 #define _EVENT_H
29
30
31 #define FG_EVENT_SUSP 0
32 #define FG_EVENT_READY 1
33 #define FG_EVENT_QUEUED 2
34
35
36 /* Initialize the scheduling subsystem */
37 void fgEventInit( void );
38
39 /* Register an event with the scheduler, returns a pointer into the
40  * event table */
41 int fgEventRegister(char *desc, void (*event)( void ), int status, 
42                     int interval);
43
44 /* Update the scheduling parameters for an event */
45 void fgEventUpdate( void );
46
47 /* Delete a scheduled event */
48 void fgEventDelete( void );
49
50 /* Temporarily suspend scheduling of an event */
51 void fgEventSuspend( void );
52
53 /* Resume scheduling and event */
54 void fgEventResume( void );
55
56 /* Dump scheduling stats */
57 void fgEventPrintStats( void );
58
59 /* Add pending jobs to the run queue and run the job at the front of
60  * the queue */
61 void fgEventProcess( void );
62
63
64 #endif /* _EVENT_H */
65
66
67 /* $Log$
68 /* Revision 1.3  1998/01/22 02:59:43  curt
69 /* Changed #ifdef FILE_H to #ifdef _FILE_H
70 /*
71  * Revision 1.2  1998/01/19 18:40:39  curt
72  * Tons of little changes to clean up the code and to remove fatal errors
73  * when building with the c++ compiler.
74  *
75  * Revision 1.1  1997/12/30 04:19:22  curt
76  * Initial revision.
77  *
78  */