Esempio n. 1
0
 /**
  * Returns the value of this TimeInstant object as a double type in the time unit of the reference
  * time.
  *
  * @return double: the time value of the TimeInstant object as a double type in the time unit
  *     given as a parameter
  */
 public double getTimeAsDouble() {
   return getTimeAsDouble(TimeOperations.getReferenceUnit());
 }
Esempio n. 2
0
 /**
  * Returns the value of this TimeInstant object as a long type in the time unit of the reference
  * time. If the parameter has a coarser granularity than epsilon the returned value will be
  * truncated, so lose precision.
  *
  * @return long: the time value of the TimeInstant object as a long type in the time unit given as
  *     a parameter or Long.MIN_VALUE if conversion would negatively overflow, or Long.MAX_VALUE if
  *     it would positively overflow.
  */
 public long getTimeTruncated() {
   return getTimeTruncated(TimeOperations.getReferenceUnit());
 }
Esempio n. 3
0
 /**
  * Returns the value of this TimeInstant object as a long type in the time unit of the reference
  * time. If the parameter has a coarser granularity than epsilon the returned value will be
  * rounded, so lose precision.
  *
  * @return long: the time value of the TimeInstant object as a long type in the time unit given as
  *     a parameter or Long.MIN_VALUE if conversion would negatively overflow, or Long.MAX_VALUE if
  *     it would positively overflow.
  */
 public long getTimeRounded() {
   return getTimeRounded(TimeOperations.getReferenceUnit());
 }
Esempio n. 4
0
 /**
  * Constructs a TimeInstant object with the given time value in the time unit of the reference
  * time. It represents a time Instant in simulation time.
  *
  * @param timeInReferenceUnit double : The time value of this TimeInstant in the time unit of the
  *     reference time.
  */
 public TimeInstant(double timeInReferenceUnit) {
   this(timeInReferenceUnit, TimeOperations.getReferenceUnit());
 }