diff options
author | John Kohl <jtkohl@mit.edu> | 1987-06-12 06:13:54 +0000 |
---|---|---|
committer | John Kohl <jtkohl@mit.edu> | 1987-06-12 06:13:54 +0000 |
commit | 2a5fbec60dbc9c1a08e104760f64bbdc33c8a1fa (patch) | |
tree | 55c894621b3271d347d45263971d4f3234bac157 /server/timer.h | |
parent | d13137b124bb247fd8462a592b444c7e358deb9d (diff) |
revisions for use in Zephyr
Diffstat (limited to 'server/timer.h')
-rw-r--r-- | server/timer.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/server/timer.h b/server/timer.h index 1c35336..2ce07ab 100644 --- a/server/timer.h +++ b/server/timer.h @@ -1,3 +1,40 @@ +/* This file is part of the Project Athena Zephyr Notification System. + * It contains definitions used by timer.c + * + * Created by: John T. Kohl + * Derived from timer_manager_.h by Ken Raeburn + * + * $Source$ + * $Author$ + * $Header$ + * + */ + +/* + * timer_manager_ -- routines for handling timers in login_shell + * (and elsewhere) + * + * Copyright 1986 Student Information Processing Board, + * Massachusetts Institute of Technology + * + * written by Ken Raeburn + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright +notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting +documentation, and that the name of M.I.T. and the Student +Information Processing Board not be used in +advertising or publicity pertaining to distribution of the +software without specific, written prior permission. +M.I.T. and the Student Information Processing Board +make no representations about the suitability of +this software for any purpose. It is provided "as is" +without express or implied warranty. + + */ + typedef struct _timer *timer; struct _timer { @@ -7,14 +44,20 @@ struct _timer { long alarm_time; /* procedure to call when timer goes off */ void (*func)(); + /* argument for that procedure */ + caddr_t arg; }; #define ALARM_TIME(x) ((x)->alarm_time) #define ALARM_FUNC(x) ((x)->func) #define ALARM_NEXT(x) ((x)->next) #define ALARM_PREV(x) ((x)->prev) +#define ALARM_ARG(x) ((x)->arg) #define TIMER_SIZE sizeof(struct _timer) +#define NOW (time((time_t *)NULL)) timer timer_set_rel(), timer_set_abs(); int reset_timer(), add_timer(); int suspend_timers(), restart_timers(); + +extern long nexttimo; /* Unix time of next timout */ |