Example #1
0
  /** Construct the DTNTime based on the current time */
  public DTNTime() {

    long secondsPassFromRef = TimeHelper.current_seconds_from_ref();
    long nanoseconds = 0; // set to zero as it couldn't be done with java
    init(secondsPassFromRef, nanoseconds);
  }
Example #2
0
  /**
   * Construct the BundleTimestamp based on the inputTime Date and the seqno specified
   *
   * @param inputTime Date object, get seconds from date and init DTNTime
   */
  public DTNTime(Date inputTime) {

    long secondsPassFromRef = TimeHelper.seconds_from_ref(inputTime);
    long nanoseconds = 0; // set to zero as it couldn't be done with java
    init(secondsPassFromRef, nanoseconds);
  }