/[cvs]/eggdrop1.9/src/egg_timer.h
ViewVC logotype

Contents of /eggdrop1.9/src/egg_timer.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download) (as text)
Fri Mar 22 16:01:20 2002 UTC (17 years, 3 months ago) by ite
Branch: MAIN
Changes since 1.3: +11 -10 lines
File MIME type: text/x-csrc
* Created eggdrop's library context.
* Moved registry stuff to libeggdrop.
* Some headers vs. prototypes cleanups.

1 #ifndef _EGG_TIMER_H
2 #define _EGG_TIMER_H
3
4 typedef struct egg_timeval_b {
5 int sec;
6 int usec;
7 } egg_timeval_t;
8
9 #define TIMER_REPEAT 1
10
11 /* Create a simple timer with no client data and no flags. */
12 #define timer_create(howlong,callback) timer_create_complex(howlong, callback, NULL, 0)
13
14 /* Create a simple timer with no client data, but it repeats. */
15 #define timer_create_repeater(howlong,callback) timer_create_complex(howlong, callback, NULL, TIMER_REPEAT)
16
17 extern void timer_init();
18 extern int timer_get_time(egg_timeval_t *curtime);
19 extern int timer_diff(egg_timeval_t *from_time, egg_timeval_t *to_time, egg_timeval_t *diff);
20 extern int timer_create_complex(egg_timeval_t *howlong, Function callback, void *client_data, int flags);
21 extern int timer_destroy(int timer_id);
22 extern int timer_destroy_all();
23 extern int timer_get_shortest(egg_timeval_t *howlong);
24 extern int timer_run();
25
26 #endif /* _EGG_TIMER_H */

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23