public class TuioTime
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
TuioTime()
The default constructor takes no arguments and sets
the Seconds and Microseconds attributes of the newly created TuioTime both to zero.
|
TuioTime(long msec)
This constructor takes the provided time represented in total Milliseconds
and assigs this value to the newly created TuioTime.
|
TuioTime(long sec,
long usec)
This constructor takes the provided time represented in Seconds and Microseconds
and assigs these value to the newly created TuioTime.
|
TuioTime(TuioTime ttime)
This constructor takes the provided TuioTime
and assigs its Seconds and Microseconds values to the newly created TuioTime.
|
TuioTime(TuioTime ttime,
long f_id)
This constructor takes the provided TuioTime
and assigs its Seconds and Microseconds values to the newly created TuioTime.
|
Modifier and Type | Method and Description |
---|---|
TuioTime |
add(long us)
Sums the provided time value represented in total Microseconds to this TuioTime.
|
TuioTime |
add(TuioTime ttime)
Sums the provided TuioTime to the private Seconds and Microseconds attributes.
|
boolean |
equals(TuioTime ttime)
Takes a TuioTime argument and compares the provided TuioTime to the private Seconds and Microseconds attributes.
|
long |
getFrameID()
Returns the Frame ID associated to this TuioTime.
|
long |
getMicroseconds()
Returns the TuioTime Microseconds component.
|
long |
getSeconds()
Returns the TuioTime Seconds component.
|
static TuioTime |
getSessionTime()
Returns the present TuioTime representing the time since session start.
|
static TuioTime |
getStartTime()
Returns the absolut TuioTime representing the session start.
|
static TuioTime |
getSystemTime()
Returns the absolut TuioTime representing the current system time.
|
long |
getTotalMilliseconds()
Returns the total TuioTime in Milliseconds.
|
static void |
initSession()
This static method globally resets the TUIO session time.
|
void |
reset()
Resets the seconds and micro_seconds attributes to zero.
|
void |
setFrameID(long f_id)
associates a Frame ID to this TuioTime.
|
TuioTime |
subtract(long us)
Subtracts the provided time represented in Microseconds from the private Seconds and Microseconds attributes.
|
TuioTime |
subtract(TuioTime ttime)
Subtracts the provided TuioTime from the private Seconds and Microseconds attributes.
|
public TuioTime()
public TuioTime(long msec)
msec
- the total time in Millsecondspublic TuioTime(long sec, long usec)
sec
- the total time in secondsusec
- the microseconds time componentpublic TuioTime(TuioTime ttime)
ttime
- the TuioTime used to copypublic TuioTime(TuioTime ttime, long f_id)
ttime
- the TuioTime used to copyf_id
- the Frame ID to associatepublic TuioTime add(long us)
us
- the total time to add in Microsecondspublic TuioTime add(TuioTime ttime)
ttime
- the TuioTime to addpublic TuioTime subtract(long us)
us
- the total time to subtract in Microsecondspublic TuioTime subtract(TuioTime ttime)
ttime
- the TuioTime to subtractpublic boolean equals(TuioTime ttime)
ttime
- the TuioTime to comparepublic void reset()
public long getSeconds()
public long getMicroseconds()
public long getTotalMilliseconds()
public static void initSession()
public static TuioTime getSessionTime()
public static TuioTime getStartTime()
public static TuioTime getSystemTime()
public void setFrameID(long f_id)
f_id
- the Frame ID to associatepublic long getFrameID()