2010/7/17 Radhesh Kamath <rmk.list@xxxxxxxxx>: > On Fri, Jul 16, 2010 at 12:36 PM, Jan Ceuleers > <jan.ceuleers@xxxxxxxxxxxx> wrote: >> On 15/07/10 18:42, Radhesh Kamath wrote: >>> I have a kernel module that sends me an RDTSC value to userspace, and >>> I need to get a UTC timestamp based on this. >>> As far as I understand, RDTSC gives me the clock ticks that have >>> elapsed since the processor was switched on (this is a 64-bit machine, >>> so my guess is that wraparound is not an issue). >>> >>> How can I use this info to obtain a UTC timestamp? >> >> Radhesh, >> >> I suggest that you look into the NTP daemon (ntpd, http://www.ntp.org/). >> >> This daemon already does its best to obtain timing information from as >> many sources as you configure, in order to discipline the local clock to >> observe UTC as closely as possible. >> >> Jan > > Hi Jan, > > Thanks for the suggestion about the NTP daemon. But the problem I am > trying to solve is different. > I need to get a UTC timestamp, and use the RDTSC for doing so. > > The CPU frequency is not varied, so a tick will represent the same > amount of time. Nope, i think the CPU frequency maybe is varied. Pls. reference "CPU throttling" http://en.wikipedia.org/wiki/Dynamic_frequency_scaling > So the question is, how do I arrive at a UTC value? > > Thanks, > Radhesh > >> >> -- >> To unsubscribe from this list: send an email with >> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx >> Please read the FAQ at http://kernelnewbies.org/FAQ >> >> > > -- > To unsubscribe from this list: send an email with > "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx > Please read the FAQ at http://kernelnewbies.org/FAQ > > -- Best Regards Lin -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ