summaryrefslogtreecommitdiff
path: root/server/timer.h
diff options
context:
space:
mode:
authorGravatar Richard Basch <probe@mit.edu>1993-11-19 11:04:47 +0000
committerGravatar Richard Basch <probe@mit.edu>1993-11-19 11:04:47 +0000
commit72be0ca6a34dd05f151d03615ce6994dc64bfee7 (patch)
treefe64d2c7a99523dbe6a681544477801813a20de3 /server/timer.h
parentf4cf0a22cf7cc0a5223a6e638998402b965c6528 (diff)
Use gettimeofday() not time(), and update global variable t_local.
Diffstat (limited to 'server/timer.h')
-rw-r--r--server/timer.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/server/timer.h b/server/timer.h
index 1d44de8..0413182 100644
--- a/server/timer.h
+++ b/server/timer.h
@@ -59,11 +59,7 @@ typedef struct _timer {
#define ALARM_ARG(x) ((x)->arg)
#define TIMER_SIZE sizeof(struct _timer)
-#ifdef mips
-#define time_t long /* sigh */
-#endif
-extern time_t time P((time_t*));
-#define NOW (time((time_t *)NULL))
+#define NOW (gettimeofday(&t_local, (struct timezone *)0), t_local.tv_sec)
typedef void (*timer_proc) P((void *));
extern timer timer_set_rel P((long, timer_proc, void*));
extern timer timer_set_abs P((long, timer_proc, void*));
@@ -73,4 +69,5 @@ extern void timer_reset P((timer)), timer_process P((void));
#define timer_when(x) ALARM_TIME(x)
+extern struct timeval t_local;
extern long nexttimo; /* Unix time of next timout */