Class ITimeValue


  • public class ITimeValue
    extends RefCounted
    Deprecated.
    . Do not use.
    Time (duration) values with units.
    This class also has methods
    that correctly account for long wrapping when comparing time values.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ITimeValue.Unit
      Deprecated.
       
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ITimeValue​(long cPtr, boolean cMemoryOwn)
      Deprecated.
      Internal Only.
      protected ITimeValue​(long cPtr, boolean cMemoryOwn, java.util.concurrent.atomic.AtomicLong ref)
      Deprecated.
      Internal Only.
    • Constructor Detail

      • ITimeValue

        protected ITimeValue​(long cPtr,
                             boolean cMemoryOwn)
        Deprecated.
        Internal Only.
      • ITimeValue

        protected ITimeValue​(long cPtr,
                             boolean cMemoryOwn,
                             java.util.concurrent.atomic.AtomicLong ref)
        Deprecated.
        Internal Only.
    • Method Detail

      • getCPtr

        public static long getCPtr​(ITimeValue obj)
        Deprecated.
        Internal Only. Not part of public API. Get the raw value of the native object that obj is proxying for.
        Parameters:
        obj - The java proxy object for a native object.
        Returns:
        The raw pointer obj is proxying for.
      • getMyCPtr

        public long getMyCPtr()
        Deprecated.
        Internal Only. Not part of public API. Get the raw value of the native object that we're proxying for.
        Overrides:
        getMyCPtr in class RefCounted
        Returns:
        The raw pointer we're proxying for.
      • copyReference

        public ITimeValue copyReference()
        Deprecated.
        Create a new ITimeValue object that is actually referring to the exact same underlying native object.
        Overrides:
        copyReference in class RefCounted
        Returns:
        the new Java object.
      • equals

        public boolean equals​(java.lang.Object obj)
        Deprecated.
        Compares two values, returning true if the underlying objects in native code are the same object. That means you can have two different Java objects, but when you do a comparison, you'll find out they are the EXACT same object.
        Overrides:
        equals in class java.lang.Object
        Returns:
        True if the underlying native object is the same. False otherwise.
      • hashCode

        public int hashCode()
        Deprecated.
        Get a hashable value for this object.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hashable value.
      • make

        public static ITimeValue make​(long value,
                                      ITimeValue.Unit unit)
        Deprecated.
        Make a new time value.
        Parameters:
        value - The value.
        unit - The unit value is expressed in.
        Returns:
        a new time value.
      • make

        public static ITimeValue make​(ITimeValue src)
        Deprecated.
        Make a copy of a time value from another time value.
        Parameters:
        src - The time value to copy. If 0 this method returns 0.
        Returns:
        a new time value.
      • get

        public long get​(ITimeValue.Unit unit)
        Deprecated.
        Get the value of this ITimeValue, in the specified Unit.
        Parameters:
        unit - The unit you want to get a value as.
        Returns:
        The value, converted into the appropriate Unit.
      • compareTo

        public int compareTo​(ITimeValue other)
        Deprecated.
        Compare this timeValue to another.
        This compareTo will compare the values, but will assume that the values
        can never be more than half of int64_t's MAX_VALUE apart. If they are
        it will assume long wrapping has occurred. This is required especially
        if you're using TimeValue's as absolute time stamps, and want to know
        which is earlier.
        Parameters:
        other - the value to compare to
        Returns:
        -1 if this < other; +1 if this > other; 0 otherwise
      • compare

        public static int compare​(ITimeValue a,
                                  ITimeValue b)
        Deprecated.
        Convenience method that calls a.compareTo(b).
        Parameters:
        a - first value.
        b - second value.
        Returns:
        -1 if a < b; +1 if a > b; 0 otherwise
      • compare

        public static int compare​(long a,
                                  long b)
        Deprecated.
        And another convenience method that deals with un-unitted long values.
        Parameters:
        a - the first object.
        b - the second object.
        Returns:
        #compare(ITimeValue, ITimeValue) where both a and b are assumed to be MICROSECONDS.