mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] include/linux/time.h: define USEC_PER_SEC and friends
@ 2018-12-14 15:23 Ahmad Fatoum
  2018-12-14 15:23 ` [PATCH 2/2] net: fec_imx: fix timeout off by *1000 error Ahmad Fatoum
  2018-12-17  9:48 ` [PATCH 1/2] include/linux/time.h: define USEC_PER_SEC and friends Sascha Hauer
  0 siblings, 2 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2018-12-14 15:23 UTC (permalink / raw)
  To: barebox

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>
---
 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-12-17  9:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-14 15:23 [PATCH 1/2] include/linux/time.h: define USEC_PER_SEC and friends Ahmad Fatoum
2018-12-14 15:23 ` [PATCH 2/2] net: fec_imx: fix timeout off by *1000 error Ahmad Fatoum
2018-12-14 15:29   ` Ahmad Fatoum
2018-12-17  9:50     ` Sascha Hauer
2018-12-17  9:48 ` [PATCH 1/2] include/linux/time.h: define USEC_PER_SEC and friends Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox