Package ch.agent.t2.time

Examples of ch.agent.t2.time.TimeIndex.convert()


   * @return the current time
   */
  public static TimeIndex now(TimeDomain domain) {
    try {
      TimeIndex t = new SystemTime();
      return t.convert(domain, Adjustment.DOWN);
    } catch (T2Exception e) {
      // should not occur because of the adjustment
      throw new RuntimeException(e);
    }
  }
View Full Code Here


   * @return the current time
   */
  public static TimeIndex now(TimeDomain domain) {
    try {
      TimeIndex t = new SystemTime();
      return t.convert(domain, Adjustment.DOWN);
    } catch (T2Exception e) {
      // should not occur because of the adjustment
      throw new RuntimeException(e);
    }
  }
View Full Code Here

   * @return the current time
   */
  public static TimeIndex now(TimeDomain domain) {
    try {
      TimeIndex t = new SystemTime();
      return t.convert(domain, Adjustment.DOWN);
    } catch (T2Exception e) {
      // should not occur because of the adjustment
      throw new RuntimeException(e);
    }
  }
View Full Code Here

       * domain.
       */
      if (domain.compareResolutionTo(Resolution.DAY) < 0) {
        // apply the offset in the DAILY domain
        TimeIndex t = addOffset(TimeUtil.now(Day.DOMAIN));
        return t.convert(domain, Adjustment.DOWN);
      } else {
        // apply the offset in the context domain
        return addOffset(TimeUtil.now(domain));
      }
    }
View Full Code Here

       * domain.
       */
      if (domain.compareResolutionTo(Resolution.DAY) < 0) {
        // apply the offset in the DAILY domain
        TimeIndex t = addOffset(TimeUtil.now(Day.DOMAIN));
        return t.convert(domain, Adjustment.DOWN);
      } else {
        // apply the offset in the context domain
        return addOffset(TimeUtil.now(domain));
      }
    }
View Full Code Here

   * @return the current time
   */
  public static TimeIndex now(TimeDomain domain) {
    try {
      TimeIndex t = new SystemTime();
      return t.convert(domain, Adjustment.DOWN);
    } catch (T2Exception e) {
      // should not occur because of the adjustment
      throw new RuntimeException(e);
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.