public final class Time extends Object
Modifier and Type | Field and Description |
---|---|
static long |
UNIX_OFFSET
Difference between the CORBA Epoch and the Unix Epoch: the time
from 1582/10/15 00:00 until 1970/01/01 00:00 in 100 ns units.
|
Modifier and Type | Method and Description |
---|---|
static org.omg.TimeBase.UtcT |
corbaFuture(long corbaUnits)
Returns a CORBA UtcT that represents an instant that lies
a given number of CORBA time units (100 ns) in the future.
|
static org.omg.TimeBase.UtcT |
corbaTime()
Returns the current time as a CORBA UtcT.
|
static org.omg.TimeBase.UtcT |
corbaTime(Date date)
Converts the given Java date into a CORBA UtcT.
|
static org.omg.TimeBase.UtcT |
corbaTime(long unixTime)
Converts the given unixTime into a CORBA UtcT.
|
static org.omg.TimeBase.UtcT |
earliest(org.omg.TimeBase.UtcT timeA,
org.omg.TimeBase.UtcT timeB)
Compares two UtcT time values and returns that which is earlier.
|
static org.omg.TimeBase.UtcT |
fromCDR(byte[] buffer)
Decodes a CDR encapsulation of a UtcT.
|
static boolean |
hasPassed(org.omg.TimeBase.UtcT time)
Returns true if the instant represented by the given UtcT is
already in the past, false otherwise.
|
static long |
millisTo(org.omg.TimeBase.UtcT time)
Returns the number of milliseconds between now and the given CORBA
time.
|
static byte[] |
toCDR(org.omg.TimeBase.UtcT time)
Returns a CDR encapsulation of the given UtcT.
|
static void |
waitFor(org.omg.TimeBase.UtcT time)
This method blocks until the given time has been reached.
|
public static final long UNIX_OFFSET
public static org.omg.TimeBase.UtcT corbaTime()
public static org.omg.TimeBase.UtcT corbaTime(long unixTime)
unixTime
- the number of milliseconds since 1970/01/01 00:00 UTC.public static org.omg.TimeBase.UtcT corbaTime(Date date)
public static org.omg.TimeBase.UtcT corbaFuture(long corbaUnits)
public static long millisTo(org.omg.TimeBase.UtcT time)
public static boolean hasPassed(org.omg.TimeBase.UtcT time)
public static org.omg.TimeBase.UtcT earliest(org.omg.TimeBase.UtcT timeA, org.omg.TimeBase.UtcT timeB)
public static byte[] toCDR(org.omg.TimeBase.UtcT time)
public static org.omg.TimeBase.UtcT fromCDR(byte[] buffer)
public static void waitFor(org.omg.TimeBase.UtcT time)
Copyright © 2017 JacORB. All rights reserved.