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>
This commit is contained in:
parent
ea383676cf
commit
673e014fab
|
@ -28,3 +28,7 @@ typedef __SIZE_TYPE__ ssize_t;
|
||||||
#define KHz (1000)
|
#define KHz (1000)
|
||||||
#define MHz (1000*KHz)
|
#define MHz (1000*KHz)
|
||||||
#define GHz (1000*MHz)
|
#define GHz (1000*MHz)
|
||||||
|
|
||||||
|
#define USECS_PER_SEC 1000000
|
||||||
|
#define MSECS_PER_SEC 1000
|
||||||
|
#define USECS_PER_MSEC (USECS_PER_SEC / MSECS_PER_SEC)
|
||||||
|
|
Loading…
Reference in New Issue