Statistics
| Branch: | Revision:

iof-bird-daemon / sysdep / unix / timer.h @ 25697773

History | View | Annotate | Download (493 Bytes)

1
/*
2
 *        BIRD Timers
3
 *
4
 *        (c) 1998 Martin Mares <mj@ucw.cz>
5
 *
6
 *        Can be freely distributed and used under the terms of the GNU GPL.
7
 */
8

    
9
#ifndef _BIRD_TIMER_H_
10
#define _BIRD_TIMER_H_
11

    
12
#include "lib/resource.h"
13

    
14
typedef struct timer {
15
        resource r;
16
        void (*hook)(struct timer *);
17
        void *data;
18
        /* internal fields should be here */
19
} timer;
20

    
21
timer *tm_new(pool *, void (*hook)(timer *), void *data);
22
void tm_start(timer *, unsigned after);
23
void tm_stop(timer *);
24
void tm_trigger(timer *);
25

    
26
#endif