• Patrick McLean's avatar
    dig: Use high resolution clocks when microsecond accuracy is requested · 56cef149
    Patrick McLean authored
    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.
host.c 22.7 KB