2 * Written by Toshiharu OHNO (tony-o@iij.ad.jp)
4 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
6 * Redistribution and use in source and binary forms are permitted
7 * provided that the above copyright notice and this paragraph are
8 * duplicated in all such forms and that any documentation,
9 * advertising materials, and other materials related to such
10 * distribution and use acknowledge that the software was developed
11 * by the Internet Initiative Japan. The name of the
12 * IIJ may not be used to endorse or promote products derived
13 * from this software without specific prior written permission.
14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
15 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
16 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
23 #define TICKUNIT 100000 /* usec's per Unit */
24 #define SECTICKS (1000000/TICKUNIT) /* Units per second */
29 u_long rest; /* Ticks to expire */
30 u_long load; /* Initial load value */
31 void (*func)(void *); /* Function called when timer is expired */
32 void *arg; /* Argument passed to timeout function */
33 struct pppTimer *next; /* Link to next timer */
34 struct pppTimer *enext; /* Link to next expired timer */
37 #define TIMER_STOPPED 0
38 #define TIMER_RUNNING 1
39 #define TIMER_EXPIRED 2
43 extern void timer_Start(struct pppTimer *);
44 extern void timer_Stop(struct pppTimer *);
45 extern void timer_InitService(int);
46 extern void timer_TermService(void);
47 extern void timer_Show(int LogLevel, struct prompt *);