[PATCH 1/2] include/linux/time.h: define USEC_PER_SEC and friends

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 include/linux/time.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/time.h b/include/linux/time.h
index 3a1bb50020fd..7903139a65b2 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 */
-- 
2.19.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux