summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorIgor Prusov <[email protected]>2023-11-09 20:10:02 +0300
committerTom Rini <[email protected]>2023-11-16 18:59:58 -0500
commitd7ce04c7f4cbae9608287ebd810a411944efff9a (patch)
tree90efd11e0b2ac5137fadf749f62bceb5f52b8da0 /include/linux
parent7667bdeb0e6f63b4df9a253c85ea08d1625d6e63 (diff)
linux/time.h: Add Linux time conversion defines
Currently there are no defines for time conversion in time.h, which leads to drivers declaring those locally or not using defines at all, so add them from Linux. Signed-off-by: Igor Prusov <[email protected]> Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/time.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/time.h b/include/linux/time.h
index 14ff5b6f481..14a144d9c9c 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -11,6 +11,15 @@
#define _REENT_ONLY
+#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 PSEC_PER_SEC 1000000000000LL
+#define FSEC_PER_SEC 1000000000000000LL
+
#define SECSPERMIN 60L
#define MINSPERHOUR 60L
#define HOURSPERDAY 24L