REORG: time: move time-keeping code and variables to clock.c
There is currently a problem related to time keeping. We're mixing
the functions to perform calculations with the os-dependent code
needed to retrieve and adjust the local time.
This patch extracts from time.{c,h} the parts that are solely dedicated
to time keeping. These are the "now" or "before_poll" variables for
example, as well as the various now_*() functions that make use of
gettimeofday() and clock_gettime() to retrieve the current time.
The "tv_*" functions moved there were also more appropriately renamed
to "clock_*".
Other parts used to compute stolen time are in other files, they will
have to be picked next.
diff --git a/Makefile b/Makefile
index 998a17d..9401237 100644
--- a/Makefile
+++ b/Makefile
@@ -886,7 +886,7 @@
src/time.o src/signal.o src/mworker-prog.o src/hpack-dec.o src/fix.o \
src/arg.o src/eb64tree.o src/chunk.o src/shctx.o src/regex.o \
src/fcgi.o src/eb32tree.o src/eb32sctree.o src/dynbuf.o src/uri_auth.o \
- src/hpack-tbl.o src/ebimtree.o src/auth.o src/ebsttree.o \
+ src/hpack-tbl.o src/ebimtree.o src/auth.o src/ebsttree.o src/clock.o \
src/ebistree.o src/base64.o src/wdt.o src/pipe.o src/http_acl.o \
src/hpack-enc.o src/dict.o src/dgram.o src/init.o src/hpack-huff.o \
src/freq_ctr.o src/ebtree.o src/hash.o src/version.o src/errors.o \