From d99a6874f5397955e1d6cb3098ab274d0836109f Mon Sep 17 00:00:00 2001 From: Matthias Weisser Date: Tue, 29 Nov 2011 12:16:40 +0100 Subject: sandbox: Add timer simulation Making sleep command work Signed-off-by: Matthias Weisser Signed-off-by: Mike Frysinger --- include/os.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include') diff --git a/include/os.h b/include/os.h index fd4120c359..f3af4f0e0e 100644 --- a/include/os.h +++ b/include/os.h @@ -84,3 +84,17 @@ void os_tty_raw(int fd); * \return Pointer to length bytes or NULL on error */ void *os_malloc(size_t length); + +/** + * Access to the usleep function of the os + * + * \param usec Time to sleep in micro seconds + */ +void os_usleep(unsigned long usec); + +/** + * Gets a monotonic increasing number of nano seconds from the OS + * + * \return A monotonic increasing time scaled in nano seconds + */ +u64 os_get_nsec(void); -- cgit v1.2.1