Mailing List Archive


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

Re: [tlug] timing for geeks II.



On 12/6/05, Michal Hajek <hajek1@example.com> wrote:
Hello :)

Having cleared the issue with printf() :) and ftime() vs. gettimeofday(),
I would like to make a step further and address the problem of
gettimeofday() vs. clock_gettime() and, perhaps separately, clock_getres().

Of course, Ian Wells was writing about this all the time, unfortunatly,
I was bussy with printf() (sorry). :

clock_gettime might not be as portable, but it doesn't change when ntp or anything else todges (technical term) your clock.  Thus, it ought to be what you want.  Probably not as portable, however, since I'd never heard of it before this week...

* I am not an expert on timing.  This is based on the references other people have waving about.  And if your  PC has an appallingly bad crystal it will go wrong, but if that's the case you're screwed anyway ;-)

--
Ian.



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links