summaryrefslogtreecommitdiffstats
path: root/include/linux/time.h
diff options
context:
space:
mode:
authorVojtech Pavlik <vojtech@suse.cz>2006-06-26 13:58:20 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 10:48:19 -0700
commit05ebb76109f302b949e745724bbf0f0634dba43f (patch)
tree350fa24df135197d53fef2e7d969b1bab7f97859 /include/linux/time.h
parentf3fa8ebc25129bb69929e20b0c84049c39029d8d (diff)
downloadop-kernel-dev-05ebb76109f302b949e745724bbf0f0634dba43f.zip
op-kernel-dev-05ebb76109f302b949e745724bbf0f0634dba43f.tar.gz
[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>
Diffstat (limited to 'include/linux/time.h')
-rw-r--r--include/linux/time.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/linux/time.h b/include/linux/time.h
index 0cd696c..2fa2987 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)
{
OpenPOWER on IntegriCloud