diff options
author | Joonas Lahtinen <joonas.lahtinen@linux.intel.com> | 2015-11-20 13:57:11 +0200 |
---|---|---|
committer | Thomas Wood <thomas.wood@intel.com> | 2015-11-24 16:36:54 +0000 |
commit | d84e62478bf2c34d610467a98826d64c321b839b (patch) | |
tree | f74566deb90cdef83b119620f0e84aba36971e1f /tests/drm_import_export.c | |
parent | 4bc68b1baa8ad288a695eedf4e1638e07e5ab9a1 (diff) |
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>
Diffstat (limited to 'tests/drm_import_export.c')
0 files changed, 0 insertions, 0 deletions