]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
linux/time.h: Add Linux time conversion defines
authorIgor Prusov <ivprusov@salutedevices.com>
Thu, 9 Nov 2023 17:10:02 +0000 (20:10 +0300)
committerTom Rini <trini@konsulko.com>
Thu, 16 Nov 2023 23:59:58 +0000 (18:59 -0500)
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 <ivprusov@salutedevices.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
include/linux/time.h

index 14ff5b6f481844f5c99bb466589fde412e183cf8..14a144d9c9cb58ab24901f780610f92b3cb59d36 100644 (file)
 
 #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