Joonas Lahtinen d84e62478b lib/igt_core: Prefer CLOCK_MONOTONIC_RAW
CLOCK_MONOTONIC_RAW is not affected by NTP, so it should be THE clock
used for timing execution of tests.

When fetching either the starting or ending time of a test, show the
time as -1.000s.

v6:
- Whitespace corrections (Chris)

v5:
- Do not use C99 style comments (Chris)

v4:
- Introduce time_valid macro (Chris)
- Reduce amount of boilerplate code for calculating elapsed time

v3:
- Do not exit directly from handler (Chris)
- Show elapsed time as -1 if it is not calculable

v2:
- Cache the used clock (Chris)
- Do not change the clock during execution
- Spit out and error if monotonic time can not be read

Cc: Thomas Wood <thomas.wood@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-24 16:36:54 +00:00
..
2014-07-23 16:43:05 +01:00
2014-12-04 10:17:16 +08:00
2015-07-20 18:13:37 +01:00
2013-12-05 15:32:42 -08:00
2014-02-20 13:42:25 +00:00
2011-03-29 22:52:50 +02:00
2015-09-24 14:24:18 +01:00
2015-04-14 17:44:34 +01:00
2015-02-25 16:59:22 +00:00
2015-11-11 14:20:55 +00:00
2015-09-08 16:15:16 +01:00
2015-09-08 16:15:16 +01:00
2015-10-07 17:57:26 +01:00
2015-08-21 14:13:16 +01:00
2015-07-02 08:17:17 +01:00
2015-09-08 16:15:16 +01:00
2015-08-21 14:13:16 +01:00
2015-03-25 17:52:11 +00:00
2015-03-25 17:52:11 +00:00