summaryrefslogtreecommitdiff
path: root/server/timer.h
diff options
context:
space:
mode:
authorGravatar Craig Fields <cfields@mit.edu>1995-05-28 16:14:05 +0000
committerGravatar Craig Fields <cfields@mit.edu>1995-05-28 16:14:05 +0000
commit02a6e2fd7a6fc8046bc1db0c48e60eae73f24639 (patch)
tree378803ceb8b1e15421f5863e28be2d57ccdfba55 /server/timer.h
parent3a39665e7292158867e8b42b2f14d2fa9550275a (diff)
As picked up from p4a.
Diffstat (limited to 'server/timer.h')
-rw-r--r--server/timer.h37
1 files changed, 15 insertions, 22 deletions
diff --git a/server/timer.h b/server/timer.h
index 64cd6c5..231208f 100644
--- a/server/timer.h
+++ b/server/timer.h
@@ -1,12 +1,13 @@
/* 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
+ * Created by: John T. Kohl
+ * Derived from timer_manager_.h by Ken Raeburn
*
- * $Source$
- * $Author$
- * $Header$
+ * $Source$
+ * $Author$
+ * $Header: /mit/zephyr/src/server/RCS/timer.h,v 1.9 94/03/15 12:44:40 prob
+e Exp $
*
*/
@@ -42,23 +43,15 @@ without express or implied warranty.
#endif
typedef struct _timer {
- struct _timer *next; /* Next one to go off.. */
- struct _timer *prev; /* Previous one to go off.. */
- /* time for timer to go off, absolute time */
- long alarm_time;
- /* procedure to call when timer goes off */
- void (*func)P((void*));
- /* argument for that procedure */
- void * arg;
+ int heap_pos;
+ /* time for timer to go off, absolute time */
+ long time;
+ /* procedure to call when timer goes off */
+ void (*func)P((void*));
+ /* argument for that procedure */
+ void * arg;
} *timer;
-#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 t_local.tv_sec
typedef void (*timer_proc) P((void *));
extern timer timer_set_rel P((long, timer_proc, void*));
@@ -67,7 +60,7 @@ extern void timer_reset P((timer)), timer_process P((void));
#undef P
-#define timer_when(x) ALARM_TIME(x)
+#define timer_when(x) ALARM_TIME(x)
extern struct timeval t_local;
-extern long nexttimo; /* Unix time of next timout */
+extern long nexttimo; /* Unix time of next timout */