summaryrefslogtreecommitdiff
path: root/include/time.h
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-12-27 15:36:00 (GMT)
committerTom Rini <trini@konsulko.com>2017-01-14 21:46:29 (GMT)
commita7b817699985b515b63a601b317e3e8fd413d7e9 (patch)
treeea36dffdef709fbe1c878ccddafe38beaad69454 /include/time.h
parent5bc516ed661af363611d4eb555cae35c0adc6fe7 (diff)
downloadu-boot-a7b817699985b515b63a601b317e3e8fd413d7e9.tar.xz
time: move timer APIs to include/time.h
The include/common.h is a collection of unrelated declarations, macros, etc. It is horrible to include such a cluttered header just for some timer functions. Split out timer functions into include/time.h. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/time.h')
-rw-r--r--include/time.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/time.h b/include/time.h
new file mode 100644
index 0000000..5ed021f
--- /dev/null
+++ b/include/time.h
@@ -0,0 +1,16 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef _TIME_H
+#define _TIME_H
+
+unsigned long get_timer(unsigned long base);
+
+/*
+ * Return the current value of a monotonically increasing microsecond timer.
+ * Granularity may be larger than 1us if hardware does not support this.
+ */
+unsigned long timer_get_us(void);
+
+#endif /* _TIME_H */