use clock_gettime for time resolution
commit2816f3ceaa31452f6bb67a7a7297e6795221cb35
authorEric Wong <normalperson@yhbt.net>
Fri, 24 Dec 2010 23:41:53 +0000 (24 15:41 -0800)
committerEric Wong <normalperson@yhbt.net>
Fri, 24 Dec 2010 23:48:18 +0000 (24 15:48 -0800)
tree3f3ed0229d2ce15e8287c513a2efa2a6fb47012f
parent9b46379f75f384c86e42046ab03ce55231197c92
use clock_gettime for time resolution

This lets us use CLOCK_MONOTONIC so we are not affected by
system clock changes.

We still convert to microseconds instead of nanoseconds for
(pure)-Ruby 1.8 code compatibility.  There is also little need
for nanosecond timer resolution in log files (microsecond is not
needed, even).
ext/clogger_ext/clogger.c
ext/clogger_ext/extconf.rb
test/test_clogger.rb