]> git.mxchange.org Git - flightgear.git/blob - src/Time/test_event.c
Update from JSBSim
[flightgear.git] / src / Time / test_event.c
1 #include <stdio.h>
2
3 #include "event.h"
4
5 void a() {
6     printf("Function a()\n");
7     system("date");
8 }
9
10
11 void b() {
12     printf("Function b()\n");
13     system("date");
14 }
15
16
17 void c() {
18     printf("Function c()\n");
19     fgEventPrintStats();
20 }
21
22
23 void d() {
24 }
25
26
27 main() {
28     fgEventInit();
29
30     fgEventRegister("Function b()", b, FG_EVENT_READY, 1000);
31     fgEventRegister("Function a()", a, FG_EVENT_READY, 2500);
32     fgEventRegister("Function d()", d, FG_EVENT_READY, 500);
33     fgEventRegister("Function c()", c, FG_EVENT_READY, 10000);
34
35     while ( 1 ) {
36         fgEventProcess();
37     }
38 }