From: Paul Semel <phen...@amazon.de> Signed-off-by: Paul Semel <phen...@amazon.de> --- common/time.c | 10 ++++++++++ include/xtf/time.h | 12 ++++++++++++ 2 files changed, 22 insertions(+)
diff --git a/common/time.c b/common/time.c index f75979a..246a2dd 100644 --- a/common/time.c +++ b/common/time.c @@ -131,6 +131,16 @@ static inline void mspin_sleep(uint64_t t) nspin_sleep(nsec); } +void sleep(uint64_t t) +{ + spin_sleep(t); +} + +void msleep(uint64_t t) +{ + mspin_sleep(t); +} + /* * Local variables: * mode: C diff --git a/include/xtf/time.h b/include/xtf/time.h index 2ff8f42..97f3b5b 100644 --- a/include/xtf/time.h +++ b/include/xtf/time.h @@ -25,8 +25,20 @@ uint64_t since_boot_time(void); uint64_t current_time(void); +/* This function takes seconds in parameter */ +void sleep(uint64_t f); + +/* Be careful, this function takes milliseconds in parameter, + * not microseconds ! + */ +void msleep(uint64_t f); + int gettimeofday(struct timeval *tp); + +/* This returns the current epoch time */ +#define NOW() current_time() + #endif /* XTF_TIME_H */ /* -- 2.16.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel