lkml.org 
[lkml]   [1999]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How can Emacs get a unique ID per Linux reboot?
Richard Gooch wrote:
>
> H. Peter Anvin writes:
> > Richard Gooch wrote:
> > >
> > > H. Peter Anvin writes:
> > > > Get the current uptime from /proc/uptime and subtract that from the
> > > > current time.
> > >
> > > Won't that foul up if the system is suspended (system clock is
> > > restored from hwclock on resume)?
> > > And probably also when settimeofday() is called?
> >
> > No, and yes, respectively.
>
> ??? AFAIK, /proc/uptime stops ticking over when the system is
> suspended. However, since the current time is "restored" after a
> resume, the two values will not track. The computed "boot time" will
> drift forward by as many seconds as the system was suspended.
> Is this not correct?
>

If so, then that's a bug in /proc/uptime IMNSHO.

-hpa

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.123 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site