Use nanoseconds timestamps for TimeTest

Using `clock_gettime(CLOCK_MONOTONIC, ...)` fetches timespecs with nanoseconds
at no extra cost.  This added time precision is useful for time stamping small
numbers of iterations or very fast test cases, particularly when using glbench
as a debugging tool.

Using nanosecond resolution should have minimal effect on existing way scores
are currently computed using microseconds, other than possibly reducing
variance due to quantization effects.

TEST=run glbench; scores are roughly the same before and after change

Change-Id: I252e7892f3d941cb2dc5c9e11a995cba21ac5faa
Reviewed-by: Ilja H. Friedel <>
Commit-Queue: Ilja H. Friedel <>
Tested-by: Ilja H. Friedel <>
2 files changed