summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatthias Weisser <weisserm@arcor.de>2011-11-29 12:16:40 +0100
committerMike Frysinger <vapier@gentoo.org>2011-12-10 17:54:04 -0500
commitd99a6874f5397955e1d6cb3098ab274d0836109f (patch)
tree437afdf789a66e6bb05edacce7c4bcdfe2cd5641 /include
parent21899b10850b8ba155b16038fac5dd8d98214842 (diff)
downloadu-boot-imx-d99a6874f5397955e1d6cb3098ab274d0836109f.zip
u-boot-imx-d99a6874f5397955e1d6cb3098ab274d0836109f.tar.gz
u-boot-imx-d99a6874f5397955e1d6cb3098ab274d0836109f.tar.bz2
sandbox: Add timer simulation
Making sleep command work Signed-off-by: Matthias Weisser <weisserm@arcor.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'include')
-rw-r--r--include/os.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/os.h b/include/os.h
index fd4120c..f3af4f0 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);