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

Re: need time in nano seconds



On Mon, 13 Dec 2004 21:51:00 +0530, Micheal Mukherji
<michy.mighty@gmail.com> wrote:
> On a 1.4 GHz processor, I use JVMPI( an abbreviation for Java Virtual
> Machine Programming Interface). It has a method called
> GetThreadCPUTime(), which it claims gives thread execution time in
> nanoseconds. He does not mention any hardware support. How do you
> think he is going to provide it?? I am getting values in tens of nano
> seconds also..

Units have little to do with accuracy.  I could take something
measured with a granularity of seconds and multiply by one billion,
and it would be reported in nanoseconds.  There's likely some binning
of time going on, and possibly some interpolation.  The getrusage()
function, for example, seems to like to use 10ms bins.  If you're
really concerned about ns-level times, you'll have to do some tests to
find out just how accurate the measurements are.

-- 
Michael A. Marsh
http://www.umiacs.umd.edu/~mmarsh



Reply to: