]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/time.h
Auto-update from upstream
[linux-2.6-omap-h63xx.git] / include / linux / time.h
index c10d4c21c18397cd3bfe66ea83d173d89a5d85b2..797ccd813bb004a1f02e52651f0c49260617254d 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) 
 { 
@@ -102,13 +95,14 @@ struct itimerval;
 extern int do_setitimer(int which, struct itimerval *value, struct itimerval *ovalue);
 extern int do_getitimer(int which, struct itimerval *value);
 extern void getnstimeofday (struct timespec *tv);
+extern void getnstimestamp(struct timespec *ts);
 
 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;
        }