Re: Get UTC from RDTSC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

On Thu, Jul 15, 2010 at 23:42, Radhesh Kamath <rmk.list@xxxxxxxxx> wrote:
> Hi list,
>
> Apologies if this is not purely a kernel-related question:
>
> 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?

I might be wrong, but TSC....in timing context, could only be used as
jiffies counting source and things like that...not time stamp...

What you need is probably the one that comes from CMOS....grrr I
forgot its name...let's just name it "CMOS clock"?

PS: beware of frequency stepping done in mobile processor....

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux