C Specification
typedef int64_t XrDuration;
Description
The difference between two timepoints is a duration, and thus the difference between two XrTime values is an XrDuration value. XrDuration is a base value type that represents duration as a signed 64-bit integer, representing the signed number of nanoseconds between two timepoints.
Functions that refer to durations use XrDuration as opposed to XrTime. When an XrDuration is used as a timeout parameter, the constants XR_NO_DURATION and XR_INFINITE_DURATION have special meaning. A timeout with a duration that refers to the past (that is, a negative duration) must be interpreted as a timeout of XR_NO_DURATION.
The interpretation of zero and negative durations in non-timeout uses is specified along with each such use.
See Also
Document Notes
For more information, see the OpenXR Specification
This page is extracted from the OpenXR Specification. Fixes and changes should be made to the Specification, not directly.
Copyright
Copyright 2014-2025 The Khronos Group Inc.
This work is licensed under a Creative Commons Attribution 4.0 International License.