]> err.no Git - linux-2.6/blobdiff - include/linux/time.h
Pull release into acpica branch
[linux-2.6] / include / linux / time.h
index c10d4c21c18397cd3bfe66ea83d173d89a5d85b2..bfbe92d0767c62a61f09db17b5b59cb8e4a080a6 100644 (file)
@@ -28,17 +28,10 @@ struct timezone {
 #ifdef __KERNEL__
 
 /* Parameters used to convert the timespec values */
-#ifndef USEC_PER_SEC
+#define MSEC_PER_SEC (1000L)
 #define USEC_PER_SEC (1000000L)
-#endif
-
-#ifndef NSEC_PER_SEC
 #define NSEC_PER_SEC (1000000000L)
-#endif
-
-#ifndef NSEC_PER_USEC
 #define NSEC_PER_USEC (1000L)
-#endif
 
 static __inline__ int timespec_equal(struct timespec *a, struct timespec *b) 
 { 
@@ -108,7 +101,7 @@ extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
 static inline void
 set_normalized_timespec (struct timespec *ts, time_t sec, long nsec)
 {
-       while (nsec > NSEC_PER_SEC) {
+       while (nsec >= NSEC_PER_SEC) {
                nsec -= NSEC_PER_SEC;
                ++sec;
        }