Top Description Fields Constructors Methods
org.lwjgl.openxr

public Class KHRConvertTimespecTime

extends Object
Class Inheritance
Imports
java.nio.*, org.lwjgl.system.*

The XR_KHR_convert_timespec_time extension.

This extension provides two functions for converting between timespec monotonic time and XrTime. The ConvertTimespecTimeToTimeKHR function converts from timespec time to XrTime, while the ConvertTimeToTimespecTimeKHR function converts XrTime to timespec monotonic time. The primary use case for this functionality is to be able to synchronize events between the local system and the OpenXR system.

Field Summary

Modifier and TypeField and Description
public static final String
public static final int
XR_KHR_convert_timespec_time_SPEC_VERSION

The extension specification version.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static int
nxrConvertTimespecTimeToTimeKHR(XrInstance instance, long unixTime, long time)

Unsafe version of: ConvertTimespecTimeToTimeKHR

public static int
xrConvertTimespecTimeToTimeKHR(XrInstance
an XrInstance handle previously created with CreateInstance.
instance
,
long unixTime, LongBuffer
the resulting XrTime that is equivalent to the timespecTime.
time
)

Convert timespec monotonic time to XrTime.

public static int
xrConvertTimeToTimespecTimeKHR(XrInstance
an XrInstance handle previously created with CreateInstance.
instance
,
long
an XrTime.
time
,
long
the resulting timespec time that is equivalent to a timespec obtained from clock_gettime with CLOCK_MONOTONIC.
timespecTime
)

Convert XrTime to timespec monotonic time.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

XR_KHR_CONVERT_TIMESPEC_TIME_EXTENSION_NAMEback to summary
public static final String XR_KHR_CONVERT_TIMESPEC_TIME_EXTENSION_NAME

The extension name.

XR_KHR_convert_timespec_time_SPEC_VERSIONback to summary
public static final int XR_KHR_convert_timespec_time_SPEC_VERSION

The extension specification version.

Constructor Detail

KHRConvertTimespecTimeback to summary
protected KHRConvertTimespecTime()

Method Detail

nxrConvertTimespecTimeToTimeKHRback to summary
public static int nxrConvertTimespecTimeToTimeKHR(XrInstance instance, long unixTime, long time)

Unsafe version of: ConvertTimespecTimeToTimeKHR

xrConvertTimespecTimeToTimeKHRback to summary
public static int xrConvertTimespecTimeToTimeKHR(XrInstance instance, long unixTime, LongBuffer time)

Convert timespec monotonic time to XrTime.

C Specification

To convert from timespec monotonic time to XrTime, call:


XrResult xrConvertTimespecTimeToTimeKHR(
    XrInstance                                  instance,
    const struct timespec*                      unixTime,
    XrTime*                                     time);
Description

The ConvertTimespecTimeToTimeKHR function converts a time obtained by the clock_gettime function to the equivalent XrTime.

If the output time cannot represent the input timespecTime, the runtime must return ERROR_TIME_INVALID.

Valid Usage (Implicit)
Return Codes
On success, this command returns
On failure, this command returns
Parameters
instance:XrInstance

an XrInstance handle previously created with CreateInstance.

time:LongBuffer

the resulting XrTime that is equivalent to the timespecTime.

Annotations
@NativeType:XrResult
xrConvertTimeToTimespecTimeKHRback to summary
public static int xrConvertTimeToTimespecTimeKHR(XrInstance instance, long time, long timespecTime)

Convert XrTime to timespec monotonic time.

C Specification

To convert from XrTime to timespec monotonic time, call:


XrResult xrConvertTimeToTimespecTimeKHR(
    XrInstance                                  instance,
    XrTime                                      time,
    struct timespec*                            timespecTime);
Description

The ConvertTimeToTimespecTimeKHR function converts an XrTime to time as if generated by clock_gettime.

If the output timespecTime cannot represent the input time, the runtime must return ERROR_TIME_INVALID.

Valid Usage (Implicit)
Return Codes
On success, this command returns
On failure, this command returns
Parameters
instance:XrInstance

an XrInstance handle previously created with CreateInstance.

time:long

an XrTime.

timespecTime:long

the resulting timespec time that is equivalent to a timespec obtained from clock_gettime with CLOCK_MONOTONIC.

Annotations
@NativeType:XrResult