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/sys | |
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/sys')
-rw-r--r-- | extras/mini-os/include/sys/time.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/extras/mini-os/include/sys/time.h b/extras/mini-os/include/sys/time.h new file mode 100644 index 0000000000..87887c27d1 --- /dev/null +++ b/extras/mini-os/include/sys/time.h @@ -0,0 +1,38 @@ +/* -*- Mode:C; c-basic-offset:4; tab-width:4 -*- + **************************************************************************** + * (C) 2003 - Rolf Neugebauer - Intel Research Cambridge + * (C) 2005 - Grzegorz Milos - Intel Research Cambridge + **************************************************************************** + * + * File: time.h + * Author: Rolf Neugebauer (neugebar@dcs.gla.ac.uk) + * Changes: Grzegorz Milos (gm281@cam.ac.uk) + * Robert Kaiser (kaiser@informatik.fh-wiesbaden.de) + * + * Date: Jul 2003, changes: Jun 2005, Sep 2006 + * + * Environment: Xen Minimal OS + * Description: Time and timer functions + * + **************************************************************************** + */ + +#ifndef _MINIOS_SYS_TIME_H_ +#define _MINIOS_SYS_TIME_H_ + +struct timespec { + time_t tv_sec; + long tv_nsec; +}; + +struct timezone { +}; + +struct timeval { + time_t tv_sec; /* seconds */ + suseconds_t tv_usec; /* microseconds */ +}; + +int gettimeofday(struct timeval *tv, void *tz); + +#endif /* _MINIOS_SYS_TIME_H_ */ |