source: trunk/athena/etc/larvnetd/timer.h @ 11904

Revision 11904, 1.3 KB checked in by ghudson, 26 years ago (diff)
Larvnet is monitoring you.
Line 
1/* $Id: timer.h,v 1.1 1998-09-01 20:57:47 ghudson Exp $ */
2
3/* Copyright 1998 by the Massachusetts Institute of Technology.
4 *
5 * Permission to use, copy, modify, and distribute this
6 * software and its documentation for any purpose and without
7 * fee is hereby granted, provided that the above copyright
8 * notice appear in all copies and that both that copyright
9 * notice and this permission notice appear in supporting
10 * documentation, and that the name of M.I.T. not be used in
11 * advertising or publicity pertaining to distribution of the
12 * software without specific, written prior permission.
13 * M.I.T. makes no representations about the suitability of
14 * this software for any purpose.  It is provided "as is"
15 * without express or implied warranty.
16 */
17
18/* This file declares the interface for a mini-library of functions
19 * for setting up and processing timers.
20 */
21
22#ifndef TIMER__H
23#define TIMER__H
24
25#include <sys/types.h>
26#include <time.h>
27
28typedef void (*Timer_proc)(void *);
29
30typedef struct _Timer {
31  int heap_pos;
32  time_t abstime;
33  Timer_proc func;
34  void *arg;
35} Timer;
36
37Timer *timer_set_rel(int reltime, Timer_proc proc, void *arg);
38Timer *timer_set_abs(time_t abstime, Timer_proc proc, void *arg);
39void *timer_reset(Timer *timer);
40void timer_process(void);
41struct timeval *timer_timeout(struct timeval *tvbuf);
42
43#endif /* TIMER__H */
Note: See TracBrowser for help on using the repository browser.