DragonFly users List (threaded) for 2005-05
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: time measurement
:To what degree of precision can we measure the clock as end-user
:programmers. I have found the functions nanotime and microtime but they are
:restricted to kernel development only. I know realtime linux has a
:microtime function availible for the user base. Is there an api or non
:kludgy method for doing some time measurements in the order of microseconds
:or even nanoseconds??
:
: John
gettimeofday(&tv, NULL) will return the time with microseconds
granularity.
If you are doing any sort of time differential measurements it's
usually a good idea to time as long a run as possible, to reduce
error. Take a look at the stuff in /usr/src/test/sysperf for an
example.
-Matt
Matthew Dillon
<dillon@xxxxxxxxxxxxx>
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]