pure: use monotonic clock if possible
commite3428444e87533ed03fc644d1b97356ae9112845
authorEric Wong <e@80x24.org>
Fri, 27 Feb 2015 22:35:02 +0000 (27 22:35 +0000)
committerEric Wong <e@80x24.org>
Fri, 27 Feb 2015 22:35:02 +0000 (27 22:35 +0000)
tree0d846f2865b64364be820abaa5539a3c82fce8a7
parent5aea6f54743a6dd6cd58a2a1660d36f112190a9b
pure: use monotonic clock if possible

Ruby 2.1.0 and later exposes Process.clock_gettime, resulting
in less garbage and access to the monotonic clock if it is
available.  Try to use it to achieve feature parity with the
C extension (which has always used the monotonic clock if possible).
lib/clogger/pure.rb