Re: [PATCH] Re: boot time, process start time, and NOW time

From: OGAWA Hirofumi
Date: Wed Sep 01 2004 - 14:18:03 EST


Tim Schmielau <tim@xxxxxxxxxxxxxxxxxxxxxx> writes:

> However, the actual reason were just missing wall_to_monotonic
> initializations:
>
> http://www.uwsg.iu.edu/hypermail/linux/kernel/0306.2/1330.html

Sorry for may not be related question in this thread.


xtime.tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ);

#include <stdio.h>

#define HZ 1000
#define NSEC_PER_SEC (1000000000L)
#define INITIAL_JIFFIES ((unsigned long)(unsigned int) (-300*HZ))

int main()
{
printf("%ld\n", (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ));
return 0;
}

hirofumi@devron (a)[1006]$ ./c
296000000

xtime.tv_nsec was not 0. Is this bug?
--
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/