• Patrick McLean's avatar
    Add isc_time_now_hires function to get current time with high resolution · ebced74b
    Patrick McLean authored
    The current isc_time_now uses CLOCK_REALTIME_COARSE which only updates
    on a timer tick. This clock is generally fine for millisecond accuracy,
    but on servers with 100hz clocks, this clock is nowhere near accurate
    enough for microsecond accuracy.
    This commit adds a new isc_time_now_hires function that uses
    CLOCK_REALTIME, which gives the current time, though it is somewhat
    expensive to call. When microsecond accuracy is required, it may be
    required to use extra resources for higher accuracy.
time_test.c 8.74 KB