|
AVPKit
|
Time (duration) values with units. More...
#include <ITimeValue.h>


Public Types | |
| enum | Unit { DAYS , HOURS , MINUTES , SECONDS , MILLISECONDS , MICROSECONDS , NANOSECONDS } |
Public Member Functions | |
| virtual int64_t | get (Unit unit)=0 |
| Get the value of this ITimeValue, in the specified Unit. More... | |
| virtual int32_t | compareTo (ITimeValue *other)=0 |
| Compare this timeValue to another. More... | |
Public Member Functions inherited from com::avpkit::ferry::RefCounted | |
| virtual int32_t | acquire () |
| Internal Only. More... | |
| virtual int32_t | release () |
| Internal Only. More... | |
| virtual RefCounted * | copyReference () |
| Create a new Java object that refers to the same native object. More... | |
| virtual int32_t | getCurrentRefCount () |
| Return the current reference count on this object. More... | |
| void | setJavaAllocator (void *allocator) |
| This method is public but not part of the standard API. More... | |
| void * | getJavaAllocator () |
| This method is public but not part of the standard API. More... | |
Static Public Member Functions | |
| static ITimeValue * | make (int64_t value, Unit unit) |
| Make a new time value. More... | |
| static ITimeValue * | make (ITimeValue *src) |
| Make a copy of a time value from another time value. More... | |
| static int32_t | compare (ITimeValue *a, ITimeValue *b) |
| Convenience method that calls a.compareTo(b). More... | |
| static int32_t | compare (int64_t a, int64_t b) |
| And another convenience method that deals with un-unitted long values. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from com::avpkit::ferry::RefCounted | |
| virtual void | destroy () |
| This method is called by RefCounted objects when their Ref Count reaches zero and they are about to be destroyed. | |
Protected Attributes inherited from com::avpkit::ferry::RefCounted | |
| AtomicInteger * | mRefCount |
| This is the internal reference count, represented as an AtomicInteger to make sure it is thread safe. | |
| void * | mAllocator |
| Not part of public API. | |
Time (duration) values with units.
This class also has methods that correctly account for long wrapping when comparing time values. @Deprecated. Do not use.
Definition at line 42 of file ITimeValue.h.
|
static |
And another convenience method that deals with un-unitted long values.
| a | the first object. |
| b | the second object. |
Definition at line 74 of file ITimeValue.cpp.
|
static |
Convenience method that calls a.compareTo(b).
| a | first value. |
| b | second value. |
Definition at line 54 of file ITimeValue.cpp.
References compareTo().
|
pure virtual |
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.
| other | the value to compare to |
Implemented in com::avpkit::core::TimeValue.
Referenced by compare().
|
pure virtual |
Get the value of this ITimeValue, in the specified Unit.
| unit | The unit you want to get a value as. |
Implemented in com::avpkit::core::TimeValue.
|
static |
Make a new time value.
| value | The value. |
| unit | The unit value is expressed in. |
Definition at line 42 of file ITimeValue.cpp.
|
static |
Make a copy of a time value from another time value.
| src | The time value to copy. If 0 this method returns 0. |
Definition at line 48 of file ITimeValue.cpp.