Examples of NegativeTimeException


Examples of com.squirrelhill.ibesper.ibmodel.NegativeTimeException

   * @throws NegativeTimeException startDate > endDate
   */
  private String generateSecondDuration(Date startDate, Date endDate)
      throws NegativeTimeException {
    if (endDate.getTime() - startDate.getTime() < 0)
      throw new NegativeTimeException("Cannot generate second duration " +
          "between (" + startDate + ", " + endDate + ")");
    long millis = endDate.getTime() - startDate.getTime();
   
    return (millis / 1000) + " S";
  }
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.