diff options
author | Petri Latvala <petri.latvala@intel.com> | 2018-08-08 14:06:58 +0300 |
---|---|---|
committer | Petri Latvala <petri.latvala@intel.com> | 2018-08-09 10:33:24 +0300 |
commit | 0c57495e924b25acbaa58ec41ff03aba38183d96 (patch) | |
tree | 688e66b937f4ae7852bd87ac1da60235ed1de815 /lib/igt_core.h | |
parent | 6a02badf89dfc09776117b90f1b7c36b02bfe54c (diff) |
lib: Export igt_gettime and igt_time_elapsed
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Diffstat (limited to 'lib/igt_core.h')
-rw-r--r-- | lib/igt_core.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/igt_core.h b/lib/igt_core.h index aaf1b626..b80e1702 100644 --- a/lib/igt_core.h +++ b/lib/igt_core.h @@ -929,6 +929,26 @@ void igt_set_timeout(unsigned int seconds, const char *op); /** + * igt_gettime: + * @ts: current monotonic clock reading + * + * Reports the current time in the monotonic clock. + * Returns: 0 on success, -errno on failure. + */ +int igt_gettime(struct timespec *ts); + +/** + * igt_time_elapsed: + * @then: Earlier timestamp + * @now: Later timestamp + * + * Returns: Time between two timestamps in seconds, as a floating + * point number. + */ +double igt_time_elapsed(struct timespec *then, + struct timespec *now); + +/** * igt_nsec_elapsed: * @start: measure from this point in time * |