Package org.jrobin.core.timespec

Examples of org.jrobin.core.timespec.TimeParser


   *                        allowed see RRDTool's <code>rrdfetch</code> man page.<p>
   * @return timestamp in seconds since epoch.
   * @throws RrdException Thrown if invalid time specification is supplied.
   */
  public static long getTimestamp(final String atStyleTimeSpec) throws RrdException {
      final TimeSpec timeSpec = new TimeParser(atStyleTimeSpec).parse();
    return timeSpec.getTimestamp();
  }
View Full Code Here


   *                         allowed see RRDTool's <code>rrdfetch</code> man page.<p>
   * @return An array of two longs representing starting and ending timestamp in seconds since epoch.
   * @throws RrdException Thrown if any input time specification is invalid.
   */
  public static long[] getTimestamps(final String atStyleTimeSpec1, final String atStyleTimeSpec2) throws RrdException {
      final TimeSpec timeSpec1 = new TimeParser(atStyleTimeSpec1).parse();
    final TimeSpec timeSpec2 = new TimeParser(atStyleTimeSpec2).parse();
    return TimeSpec.getTimestamps(timeSpec1, timeSpec2);
  }
View Full Code Here

   *                        allowed see RRDTool's <code>rrdfetch</code> man page.<p>
   * @return timestamp in seconds since epoch.
   * @throws RrdException Thrown if invalid time specification is supplied.
   */
  public static long getTimestamp(String atStyleTimeSpec) throws RrdException {
    TimeSpec timeSpec = new TimeParser(atStyleTimeSpec).parse();
    return timeSpec.getTimestamp();
  }
View Full Code Here

   *                         allowed see RRDTool's <code>rrdfetch</code> man page.<p>
   * @return An array of two longs representing starting and ending timestamp in seconds since epoch.
   * @throws RrdException Thrown if any input time specification is invalid.
   */
  public static long[] getTimestamps(String atStyleTimeSpec1, String atStyleTimeSpec2) throws RrdException {
    TimeSpec timeSpec1 = new TimeParser(atStyleTimeSpec1).parse();
    TimeSpec timeSpec2 = new TimeParser(atStyleTimeSpec2).parse();
    return TimeSpec.getTimestamps(timeSpec1, timeSpec2);
  }
View Full Code Here

TOP

Related Classes of org.jrobin.core.timespec.TimeParser

Copyright © 2018 www.massapicom. 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.