On Apr 18, 2008, at 7:50 PM, shri wrote:
> what call to be used in kernel to measure time taken for a operation
> if time quantum i s smaller than tick(frequency).
> i tried using ddi_get_lbolt at time t1 and t2.(at time t1 operation
> started and t2 it finished) but it always gives me zero(t2-t1).
gethrtime(9F):
DESCRIPTION
The gethrtime() function returns the current high-resolution
real time. Time is expressed as nanoseconds since some arbi-
trary time in the past; it is not correlated in any way to
the time of day, and thus is not subject to resetting or
drifting by way of adjtime(2) or settimeofday(3C). The hi-
res timer is ideally suited to performance measurement
tasks, where cheap, accurate interval timing is required.
Cheers,
- jonathan
--------------------------------------------------------------------------
Jonathan Adams, Sun Microsystems, ZFS Team http://blogs.sun.com/jwadams
_______________________________________________
opensolaris-discuss mailing list
[email protected]