diff options
author | Caveh Jalali <caveh@google.com> | 2017-08-03 15:58:14 -0700 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-08-14 18:06:33 +0000 |
commit | 673e014fab7b6640942c141a4d2d2dc23e93d7a0 (patch) | |
tree | 3398c282a5266ed618d774e8288b2a8fde6ae011 /payloads/libpayload/include | |
parent | ea383676cf7e36b48d9d548d286297271f463cab (diff) | |
download | coreboot-673e014fab7b6640942c141a4d2d2dc23e93d7a0.tar.xz |
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
<timer.h>.
Change-Id: I489dc2d1ff55d137936acec74ac875dc7fbc1713
Signed-off-by: Caveh Jalali <caveh@google.com>
Reviewed-on: https://review.coreboot.org/20882
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'payloads/libpayload/include')
-rw-r--r-- | payloads/libpayload/include/stddef.h | 4 |
1 files changed, 4 insertions, 0 deletions
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) |