summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2018-12-14 16:23:05 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2018-12-17 12:26:14 +0100
commitc0eecaa80739e2d70b8973e5736953dadf4323d7 (patch)
tree3e7168547ba8f6b01582587a3bdd57933c31b70d /include
parentf606a778cb469f6bdf1680cacd3f53a0dbb22594 (diff)
downloadbarebox-c0eecaa80739e2d70b8973e5736953dadf4323d7.tar.gz
barebox-c0eecaa80739e2d70b8973e5736953dadf4323d7.tar.xz
include/linux/time.h: define USEC_PER_SEC and friends
Linux has them in include/linux/time64.h and they are useful for making (especially microsecond) use readable such as in read*_poll_timeout. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/time.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/time.h b/include/linux/time.h
index 3a1bb50020..7903139a65 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -3,7 +3,13 @@
#include <linux/types.h>
+#define MSEC_PER_SEC 1000L
+#define USEC_PER_MSEC 1000L
+#define NSEC_PER_USEC 1000L
+#define NSEC_PER_MSEC 1000000L
+#define USEC_PER_SEC 1000000L
#define NSEC_PER_SEC 1000000000L
+#define FSEC_PER_SEC 1000000000000000LL
struct timespec {
time_t tv_sec; /* seconds */