public class OsvrTimeValueLibrary
extends java.lang.Object
implements com.sun.jna.Library
Modifier and Type | Class and Description |
---|---|
static class |
OsvrTimeValueLibrary.timeval |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
JNA_LIBRARY_NAME |
static com.sun.jna.NativeLibrary |
JNA_NATIVE_LIB |
static int |
OSVR_FALSE |
static int |
OSVR_TRUE |
Constructor and Description |
---|
OsvrTimeValueLibrary() |
Modifier and Type | Method and Description |
---|---|
static byte |
operatorGreater(OSVR_TimeValue tvA,
OSVR_TimeValue tvB)
Operator > overload for time values
Original signature : bool operator>(const OSVR_TimeValue&, const OSVR_TimeValue&) |
static byte |
operatorIsEqual(OSVR_TimeValue tvA,
OSVR_TimeValue tvB)
Operator == overload for time values
Original signature : bool operator==(const OSVR_TimeValue&, const OSVR_TimeValue&) |
static void |
osvrStructTimevalToTimeValue(OSVR_TimeValue dest,
OsvrTimeValueLibrary.timeval src)
Converts from a TimeValue struct to your system's struct timeval.
|
static int |
osvrTimeValueCmp(OSVR_TimeValue tvA,
OSVR_TimeValue tvB)
Compares two time values (assumed to be normalized), returning
the same values as strcmp
|
static void |
osvrTimeValueDifference(OSVR_TimeValue tvA,
OSVR_TimeValue tvB)
Computes the difference between two time values, replacing the first
with the result.
Effectively, `*tvA = *tvA - *tvB` |
static double |
osvrTimeValueDurationSeconds(OSVR_TimeValue tvA,
OSVR_TimeValue tvB)
Compute the difference between the two time values, returning the
duration as a double-precision floating-point number of seconds.
Effectively, `ret = *tvA - *tvB` |
static void |
osvrTimeValueGetNow(OSVR_TimeValue dest)
Gets the current time in the TimeValue.
|
static byte |
osvrTimeValueGreater(OSVR_TimeValue tvA,
OSVR_TimeValue tvB)
True if A is later than B.
|
static byte |
osvrTimeValueIsNormalized(OSVR_TimeValue tv)
Returns true if the time value is normalized.
|
static void |
osvrTimeValueNormalize(OSVR_TimeValue tv)
"Normalizes" a time value so that the absolute number of microseconds
is less than 1,000,000, and that the sign of both components is the same.
|
static void |
osvrTimeValueSum(OSVR_TimeValue tvA,
OSVR_TimeValue tvB)
Sums two time values, replacing the first with the result.
|
static void |
osvrTimeValueToStructTimeval(OsvrTimeValueLibrary.timeval dest,
OSVR_TimeValue src)
Converts from a TimeValue struct to your system's struct timeval.
|
public static final java.lang.String JNA_LIBRARY_NAME
public static final com.sun.jna.NativeLibrary JNA_NATIVE_LIB
public static final int OSVR_TRUE
public static final int OSVR_FALSE
public static void osvrTimeValueGetNow(OSVR_TimeValue dest)
void osvrTimeValueGetNow(OSVR_TimeValue*)
public static void osvrTimeValueToStructTimeval(OsvrTimeValueLibrary.timeval dest, OSVR_TimeValue src)
dest
- Pointer to an empty struct timeval for your platform.src
- A pointer to an OSVR_TimeValue you'd like to convert from.void osvrTimeValueToStructTimeval(timeval*, const OSVR_TimeValue*)
public static void osvrStructTimevalToTimeValue(OSVR_TimeValue dest, OsvrTimeValueLibrary.timeval src)
dest
- An OSVR_TimeValue destination pointer.src
- Pointer to a struct timeval you'd like to convert from.void osvrStructTimevalToTimeValue(OSVR_TimeValue*, timeval*)
public static void osvrTimeValueNormalize(OSVR_TimeValue tv)
tv
- Address of a struct TimeValue to normalize in place.void osvrTimeValueNormalize(OSVR_TimeValue*)
public static void osvrTimeValueSum(OSVR_TimeValue tvA, OSVR_TimeValue tvB)
tvA
- Destination and first source.tvB
- second sourcevoid osvrTimeValueSum(OSVR_TimeValue*, const OSVR_TimeValue*)
public static void osvrTimeValueDifference(OSVR_TimeValue tvA, OSVR_TimeValue tvB)
tvA
- Destination and first source.tvB
- second sourcevoid osvrTimeValueDifference(OSVR_TimeValue*, const OSVR_TimeValue*)
public static int osvrTimeValueCmp(OSVR_TimeValue tvA, OSVR_TimeValue tvB)
int osvrTimeValueCmp(const OSVR_TimeValue*, const OSVR_TimeValue*)
public static double osvrTimeValueDurationSeconds(OSVR_TimeValue tvA, OSVR_TimeValue tvB)
tvA
- first source.tvB
- second sourcedouble osvrTimeValueDurationSeconds(const OSVR_TimeValue*, const OSVR_TimeValue*)
public static byte osvrTimeValueGreater(OSVR_TimeValue tvA, OSVR_TimeValue tvB)
OSVR_CBool osvrTimeValueGreater(const OSVR_TimeValue*, const OSVR_TimeValue*)
public static byte osvrTimeValueIsNormalized(OSVR_TimeValue tv)
bool osvrTimeValueIsNormalized(const OSVR_TimeValue&)
public static byte operatorGreater(OSVR_TimeValue tvA, OSVR_TimeValue tvB)
bool operator>(const OSVR_TimeValue&, const OSVR_TimeValue&)
public static byte operatorIsEqual(OSVR_TimeValue tvA, OSVR_TimeValue tvB)
bool operator==(const OSVR_TimeValue&, const OSVR_TimeValue&)