Commit 56cef149 authored by Committed by Evan HuntBrowse files
dig: Use high resolution clocks when microsecond accuracy is requested
The TIME_NOW macro calls isc_time_now which uses CLOCK_REALTIME_COARSE for getting the current time. This is perfectly fine for millisecond, however when the user request microsecond resolutiuon, they are going to get very inaccurate results. This is especially true on a server class machine where the clock ticks may be set to 100HZ. This changes dig to use the new TIME_NOW_HIRES macro that uses the CLOCK_MONOTONIC_RAW that is more expensive, but gets the *actual* current time rather than the at the last kernel time tick.
Showing with 21 additions and 4 deletions