[PATCH] Time and seek optimizations

We did too many gettimeofday() calls, this patch cuts the number by
40%. Use clock_gettime() MONOTONIC instead, it is faster on my system
at least.

This patch also optimizes calling lseek() only when necessary for the
sync io engine.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/Makefile.FreeBSD b/Makefile.FreeBSD
index 06cdc80..8947117 100644
--- a/Makefile.FreeBSD
+++ b/Makefile.FreeBSD
@@ -2,8 +2,7 @@
 CFLAGS	= -Wall -O2 -g -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
 PROGS	= fio
 SCRIPTS = fio_generate_plots
-
-OBJS = fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o \
+OBJS = gettime.o fio.o ioengines.o init.o stat.o log.o time.o md5.o crc32.o \
 	filesetup.o eta.o verify.o memory.o io_u.o parse.o
 
 OBJS += engines/fio-engine-cpu.o