forked from luck/tmp_suning_uos_patched
[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 <vojtech@suse.cz> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
f3fa8ebc25
commit
05ebb76109
|
@ -29,9 +29,12 @@ struct timezone {
|
|||
|
||||
/* Parameters used to convert the timespec values: */
|
||||
#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 NSEC_PER_USEC 1000L
|
||||
#define FSEC_PER_SEC 1000000000000000L
|
||||
|
||||
static inline int timespec_equal(struct timespec *a, struct timespec *b)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user