mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
bitkeeper revision 1.1159.97.3 (415c6936SE2JuWey2d_QmYIvVEKObw)
Tiny time fix.
This commit is contained in:
1 parent
2f26ac1f7c
commit
8a841d2d9d
1 file changed
+5
-5
@@ -126,14 +126,14 @@ u64 processed_system_time; /* System time (ns) at last processing. */
|
||||
(_tv).tv_sec++; \
|
||||
} \
|
||||
} while (0)
|
||||
static inline void __normalize_time(time_t *sec, s64 *usec)
|
||||
static inline void __normalize_time(time_t *sec, s64 *nsec)
|
||||
{
|
||||
while (*usec >= NSEC_PER_SEC) {
|
||||
(*usec) -= NSEC_PER_SEC;
|
||||
while (*nsec >= NSEC_PER_SEC) {
|
||||
(*nsec) -= NSEC_PER_SEC;
|
||||
(*sec)++;
|
||||
}
|
||||
while (*usec < NSEC_PER_SEC) {
|
||||
(*usec) += NSEC_PER_SEC;
|
||||
while (*nsec < 0) {
|
||||
(*nsec) += NSEC_PER_SEC;
|
||||
(*sec)--;
|
||||
}
|
||||
}
|
||||
|
||||