lkml.org 
[lkml]   [1999]   [Jun]   [2]   [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?
Riley Williams wrote:
> > echo $[`TZ=UTC date +%s`-`cut -d . -f 1 < /proc/uptime`]
>
> OK, if you're going to deliberately mangle your system clock in some
> random way, then that will break, but if you're referring to changes
> from winter to summer time and back again, then the above will deal
> with that quite happily...

Unfortunately any system that synchronises its clock over the network
will tend to mangle the system clock a little at each adjustment.

I don't know if this is magically corrected in the uptime counter.

-- Jamie

-
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.039 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site