From: Vojtech Pavlik Date: Mon, 26 Jun 2006 11:58:20 +0000 (+0200) Subject: [PATCH] x86_64: Add useful constants to time.h X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=05ebb76109f302b949e745724bbf0f0634dba43f;p=linux-beck.git [PATCH] x86_64: Add useful constants to time.h In timekeeping code, one often does need to use conversion constants. Naming these leads to code that's easier to understand, showing the reader between which units the conversion is made. Signed-off-by: Vojtech Pavlik Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- diff --git a/include/linux/time.h b/include/linux/time.h index 0cd696cee998..2fa2987c9a07 100644 --- a/include/linux/time.h +++ b/include/linux/time.h @@ -28,10 +28,13 @@ struct timezone { #ifdef __KERNEL__ /* Parameters used to convert the timespec values: */ -#define MSEC_PER_SEC 1000L -#define USEC_PER_SEC 1000000L -#define NSEC_PER_SEC 1000000000L -#define NSEC_PER_USEC 1000L +#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 FSEC_PER_SEC 1000000000000000L static inline int timespec_equal(struct timespec *a, struct timespec *b) {