public abstract class TimeBase extends java.lang.Object implements ReflectionConstructable2<SimNode,Parameters>, java.io.Serializable
PointInTime
refers to a single system-wide reference (
PointInTime.ZERO
), while Duration
is a difference of two
times.Modifier and Type | Class and Description |
---|---|
static class |
TimeBase.InvalidTimeBaseException |
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
EXPORT_UNIT |
protected static java.lang.String |
EXPORT_VALUE |
CREATE_INSTANCE_METHOD_NAME
Modifier | Constructor and Description |
---|---|
protected |
TimeBase(long value) |
Modifier and Type | Method and Description |
---|---|
static void |
changeTimeBase(double newTimeBase,
java.lang.String newTimeUnit)
This method allows to change the time-base before the first time object
has been created.
|
static void |
changeTimeBase(TimeUnits unit)
This method allows to change the time-base before the first time object
has been created.
|
boolean |
equals(java.lang.Object obj) |
void |
exportBatch(ResultWriter writer,
java.lang.String name) |
static java.lang.String |
getTimeUnit() |
protected long |
getValue() |
int |
hashCode() |
static double |
internalToSeconds(long internal)
converts internal units to seconds
|
static long |
secondsToInternal(double seconds)
converts seconds to internal units (incl.
|
double |
toDays() |
double |
toHours() |
double |
toMicroSeconds() |
double |
toMilliSeconds() |
double |
toMinutes() |
double |
toNanoSeconds() |
double |
toPicoSeconds() |
double |
toSeconds() |
java.lang.String |
toString() |
java.lang.String |
toString(double outputTimeBase,
java.lang.String outputTimeUnit) |
java.lang.String |
toString(TimeUnits unit,
int decimalPlaces) |
protected static final java.lang.String EXPORT_VALUE
protected static final java.lang.String EXPORT_UNIT
public static double internalToSeconds(long internal)
internal
- time in internal unitspublic static long secondsToInternal(double seconds)
seconds
- time in secondspublic static void changeTimeBase(TimeUnits unit)
unit
- the new time unitpublic static void changeTimeBase(double newTimeBase, java.lang.String newTimeUnit)
newTimeBase
- number of time units per secondnewTimeUnit
- string describing the new time unitprotected long getValue()
public static java.lang.String getTimeUnit()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(double outputTimeBase, java.lang.String outputTimeUnit)
public java.lang.String toString(TimeUnits unit, int decimalPlaces)
public double toDays()
public double toHours()
public double toMinutes()
public double toSeconds()
public double toMilliSeconds()
public double toMicroSeconds()
public double toNanoSeconds()
public double toPicoSeconds()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public void exportBatch(ResultWriter writer, java.lang.String name) throws PrintException
PrintException