I guess that one of the tradeoffs to be considered for having a fixed
boottime. If after boot time NTP corrects the system time, then the
boot time would not change in accordance with NTP's correction.
> Even the current definition of btime = now - uptime has its own quirks
> (when systems are suspended uptime doesn't increment, etc) but I think
> its more likely to be correct then any other method (assuming the time
> now is more accurate then time at boot thanks to ntp or whatnot).
>
When you mention that quirk above, wouldn't that mean then that the
boottime would be off by the amount of time the system is suspended?
If uptime or jiffies is not updated but 'now' (the system time) is,
then btime would be pushed forward...
> I'm curious, how are people using the btime value? I'd think uptime and
> gettimeofday would be more useful bits of info, so I'd like to hear
> more.
Yes, that would be interesting to know.
Personally, I have been using it to determine when processes started.
Starttime, and some other process data that is recorded and presented
in /proc in jiffies. So to determine when a process started I took
that value, converted to seconds, and added it to btime. I was a bit
surpised to find that btime changed, however. And the way it is now
it'll still change whenever the system time is changed. However, at
least with the fix from 2.5.70, it doesn't wobble anymore due to loss
of precision.
-- Kingsley - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/