File: timer.h

package info (click to toggle)
diald 0.99.4-9
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,148 kB
  • ctags: 935
  • sloc: ansic: 7,109; tcl: 977; sh: 880; perl: 306; makefile: 109
file content (24 lines) | stat: -rw-r--r-- 892 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * timer.h - This timer structure was originally based upon the one in
 *           the linux kernel, but has since evolved somewhat.
 *
 * Copyright (c) 1994, 1995, 1996 Eric Schenk.
 * All rights reserved. Please see the file LICENSE which should be
 * distributed with this software for terms of use.
 */

struct timer_lst {
        struct timer_lst *next;
        struct timer_lst *prev;
        unsigned long expires;			/* how long till expiration */
	unsigned long expected;			/* expected time of timeout */
        void *data;				/* data to pass to function */
        void (*function)(void *);		/* func to call on timeout */
};

extern void add_timer(struct timer_lst * timer);
extern int  del_timer(struct timer_lst * timer);
extern void init_timer(struct timer_lst * timer);
extern void adjust_timer(void);
extern unsigned long timestamp(void);
extern unsigned long ticks(void);