Just came across this construct in Ruby's resolv code:
672: before_select = Process.clock_gettime(Process::CLOCK_MONOTONIC) 673: timeout = timelimit - before_select
We should be using this instead of wallclock time.
See also: https://blog.dnsimple.com/2018/03/elapsed-time-with-ruby-the-right-way/