It is currently Tue, 19 Sep 2017 23:01:49 GMT



 
Author Message
 Getting "absolute" time in Linux
Is there a way in either standard or Real-time Linux to get "absolute
number of ticks (or seconds) since the Epoc (or some other configurable
starting point), regardless of the kernel clock resets via
settimeofday() and the RTC resets via hwclock set and regardless of the
system reboots?


 Sun, 03 May 2009 03:34:34 GMT   
 Getting "absolute" time in Linux

"Absolute" relative to what?  Anything on the system itself reporting
seconds will be subject to the vagaries of drift relative to other
systems/"true time" (if such a thing exists).  (humor involving
general relativity etc omitted :)

rick jones
--
oxymoron n, commuter in a gas-guzzling luxury SUV with an American flag
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...



 Sun, 03 May 2009 03:58:16 GMT   
 Getting "absolute" time in Linux
In comp.os.linux.networking Boris Benenson <boris.benen...@marconi.com>:

man date
/%s

Good luck

--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvpu...@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 296: The hardware bus needs a new token.



 Sun, 03 May 2009 03:50:54 GMT   
 Getting "absolute" time in Linux

Do you mean real time or ticks of the computer clock?

What have kernel resets of rtc got to do with true time?

That may or may not be a place to start.
Note that you want to make sure your clock is on true time ( ntp or chrony
should ensure that)



 Wed, 06 May 2009 13:06:46 GMT   
 Getting "absolute" time in Linux

The 'time' function gives you the system's best estimate of the number
of seconds since the epoch. If that's what you want, that's the
function that gives it to you.

I don't know what you mean by regardless of kernel clock restets via
'settimeofday'. Presumably, if someone called 'gettimeofday', it was
because they had reason to believe it would improve the kernel's
estimate of the time since the epoch. If not, why would they have
called 'gettimeofday'?

DS



 Wed, 06 May 2009 17:40:04 GMT   
 
   [ 5 post ] 

Similar Threads

1. ipfw, ipfilter, and "Absolute BSD"

2. "Absolute OpenBSD" from No Starch Press

3. GETSERVBYNAME()????????????????????"""""""""""""

4. "Real-Time" Time Display in Console

5. Getting Linux to "answer the phone"

6. Getting "fping" to work on Linux

7. "Exact" time measuring under linux

8. "time" problems on a linux laptop

9. Critical "Times" article on Linux

10. Time to Boycott "United Linux"


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software