From 673e014fab7b6640942c141a4d2d2dc23e93d7a0 Mon Sep 17 00:00:00 2001 From: Caveh Jalali Date: Thu, 3 Aug 2017 15:58:14 -0700 Subject: [PATCH] libpayload: add *SECS_PER_SEC macros to stddef.h this adds convenience definitions for MSECS_PER_SEC, USECS_PER_MSEC, and USECS_PER_SEC along the lines of the time units in coreboot's . Change-Id: I489dc2d1ff55d137936acec74ac875dc7fbc1713 Signed-off-by: Caveh Jalali Reviewed-on: https://review.coreboot.org/20882 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- payloads/libpayload/include/stddef.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/payloads/libpayload/include/stddef.h b/payloads/libpayload/include/stddef.h index 3288487fbc..4e41eedfe8 100644 --- a/payloads/libpayload/include/stddef.h +++ b/payloads/libpayload/include/stddef.h @@ -28,3 +28,7 @@ typedef __SIZE_TYPE__ ssize_t; #define KHz (1000) #define MHz (1000*KHz) #define GHz (1000*MHz) + +#define USECS_PER_SEC 1000000 +#define MSECS_PER_SEC 1000 +#define USECS_PER_MSEC (USECS_PER_SEC / MSECS_PER_SEC)