diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-01-21 11:20:27 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-01-21 11:20:27 +0000 |
commit | afb13d4890c7b505865b8264247c2049fd0c2227 (patch) | |
tree | 2417cb72f24229f2ee3279ca7546ec3beae2bce3 /extras/mini-os/include/time.h | |
parent | 3e49205c7a0d947e5a9c37fabee4df1ae07d3135 (diff) | |
download | xen-afb13d4890c7b505865b8264247c2049fd0c2227.tar.gz xen-afb13d4890c7b505865b8264247c2049fd0c2227.tar.bz2 xen-afb13d4890c7b505865b8264247c2049fd0c2227.zip |
minios: make time interface POSIX
timespec uses tv_sec and tv_nsec too. gettimeofday takes a tz
argument.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Diffstat (limited to 'extras/mini-os/include/time.h')
-rw-r--r-- | extras/mini-os/include/time.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/extras/mini-os/include/time.h b/extras/mini-os/include/time.h index ab844e8ede..914f2fcff2 100644 --- a/extras/mini-os/include/time.h +++ b/extras/mini-os/include/time.h @@ -38,20 +38,13 @@ typedef s64 s_time_t; #define Time_Max ((s_time_t) 0x7fffffffffffffffLL) #define FOREVER Time_Max #define NSEC_TO_USEC(_nsec) ((_nsec) / 1000UL) +#define NSEC_TO_MSEC(_nsec) ((_nsec) / 1000000ULL) #define NSEC_TO_SEC(_nsec) ((_nsec) / 1000000000ULL) /* wall clock time */ typedef long time_t; typedef long suseconds_t; -struct timeval { - time_t tv_sec; /* seconds */ - suseconds_t tv_usec; /* microseconds */ -}; - -struct timespec { - time_t ts_sec; - long ts_nsec; -}; +#include <sys/time.h> /* prototypes */ @@ -59,7 +52,6 @@ void init_time(void); s_time_t get_s_time(void); s_time_t get_v_time(void); u64 monotonic_clock(void); -void gettimeofday(struct timeval *tv); void block_domain(s_time_t until); #endif /* _TIME_H_ */ |