diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-08-20 09:35:38 +0000 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-08-20 09:35:38 +0000 |
commit | a1b473eb0619b33601cf95260ddc581a7f1979be (patch) | |
tree | 7c8e6be1405c9d001b95f9f893db8c2d08cd5d11 /extras/mini-os/include/time.h | |
parent | 2bf204d13a9d2ab4611a5095bf6b7c74363c40b2 (diff) | |
download | xen-a1b473eb0619b33601cf95260ddc581a7f1979be.tar.gz xen-a1b473eb0619b33601cf95260ddc581a7f1979be.tar.bz2 xen-a1b473eb0619b33601cf95260ddc581a7f1979be.zip |
Mini-os updated to use the new time interface.
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
Diffstat (limited to 'extras/mini-os/include/time.h')
-rw-r--r-- | extras/mini-os/include/time.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/extras/mini-os/include/time.h b/extras/mini-os/include/time.h index 40b4c212fa..067b8b36a1 100644 --- a/extras/mini-os/include/time.h +++ b/extras/mini-os/include/time.h @@ -28,7 +28,7 @@ * of real time into system time */ typedef s64 s_time_t; -#define NOW() ((s_time_t)get_s_time()) +#define NOW() ((s_time_t)monotonic_clock()) #define SECONDS(_s) (((s_time_t)(_s)) * 1000000000UL ) #define TENTHS(_ts) (((s_time_t)(_ts)) * 100000000UL ) #define HUNDREDTHS(_hs) (((s_time_t)(_hs)) * 10000000UL ) @@ -36,7 +36,8 @@ typedef s64 s_time_t; #define MICROSECS(_us) (((s_time_t)(_us)) * 1000UL ) #define Time_Max ((s_time_t) 0x7fffffffffffffffLL) #define FOREVER Time_Max - +#define NSEC_TO_USEC(_nsec) (_nsec / 1000UL) +#define NSEC_TO_SEC(_nsec) (_nsec / 1000000000ULL) /* wall clock time */ typedef long time_t; @@ -46,6 +47,11 @@ struct timeval { suseconds_t tv_usec; /* microseconds */ }; +struct timespec { + time_t ts_sec; + long ts_nsec; +}; + /* prototypes */ void init_time(void); |