Rev | Line | |
---|
[9] | 1 | /*
|
---|
| 2 | clock.h
|
---|
| 3 |
|
---|
| 4 | Copyright 1995 Philip Homburg
|
---|
| 5 | */
|
---|
| 6 |
|
---|
| 7 | #ifndef CLOCK_H
|
---|
| 8 | #define CLOCK_H
|
---|
| 9 |
|
---|
| 10 | struct timer;
|
---|
| 11 |
|
---|
| 12 | typedef void (*timer_func_t) ARGS(( int fd, struct timer *timer ));
|
---|
| 13 |
|
---|
| 14 | typedef struct timer
|
---|
| 15 | {
|
---|
| 16 | struct timer *tim_next;
|
---|
| 17 | timer_func_t tim_func;
|
---|
| 18 | int tim_ref;
|
---|
| 19 | time_t tim_time;
|
---|
| 20 | int tim_active;
|
---|
| 21 | } timer_t;
|
---|
| 22 |
|
---|
| 23 | extern int clck_call_expire; /* Call clck_expire_timer from the mainloop */
|
---|
| 24 |
|
---|
| 25 | void clck_init ARGS(( void ));
|
---|
| 26 | void set_time ARGS(( time_t time ));
|
---|
| 27 | time_t get_time ARGS(( void ));
|
---|
| 28 | void reset_time ARGS(( void ));
|
---|
| 29 | /* set a timer to go off at the time specified by timeout */
|
---|
| 30 | void clck_timer ARGS(( struct timer *timer, time_t timeout, timer_func_t func,
|
---|
| 31 | int fd ));
|
---|
| 32 | void clck_untimer ARGS(( struct timer *timer ));
|
---|
| 33 | void clck_expire_timers ARGS(( void ));
|
---|
| 34 |
|
---|
| 35 | #endif /* CLOCK_H */
|
---|
| 36 |
|
---|
| 37 | /*
|
---|
| 38 | * $PchId: clock.h,v 1.5 1995/11/21 06:45:27 philip Exp $
|
---|
| 39 | */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.