[project @ 2001-01-17 15:11:04 by simonmar]
[ghc-hetmet.git] / ghc / interpreter / machdep_time.h
1
2 #ifndef MACHDEP_TIME_INCLUDED
3 #define MACHDEP_TIME_INCLUDED
4
5 #ifdef HAVE_TIME_H
6 # include <time.h>
7 #endif
8
9 #if RISCOS
10 typedef struct { unsigned hi, lo; } Time;
11 #define timeChanged(now,thn)    (now.hi!=thn.hi || now.lo!=thn.lo)
12 #define timeSet(var,tm)         var.hi = tm.hi; var.lo = tm.lo
13 #error  firstTimeIsLater, whicheverIsLater needs implementing
14 #else
15 typedef time_t Time;
16 #define timeChanged(now,thn)      (now!=thn)
17 #define timeSet(var,tm)           var = tm
18 #define firstTimeIsLater(t1,t2)   ((t1)>(t2))
19 #define whicheverIsLater(t1,t2)   (((t1)>(t2)) ? (t1) : (t2))
20 #endif
21
22 #endif